image: docker:19.03.1 services: - docker:dind stages: - build - test build-image: stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - docker build --pull -t "$CI_REGISTRY_IMAGE:testing" -f Dockerfile.testing . - docker push "$CI_REGISTRY_IMAGE:testing" daemon-jsonCommaderTest: stage: test before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY after_script: - docker stop cont - docker rm cont script: - docker pull "$CI_REGISTRY_IMAGE:testing" - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing" - docker exec cont daemon/build/test/jsonCommanderTest cli-cmdman_test: stage: test before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY after_script: - docker stop cont - docker rm cont script: - docker pull "$CI_REGISTRY_IMAGE:testing" - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing" - docker exec cont cli/build/test/cmdman_test cli-logintest: stage: test before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY after_script: - docker stop cont - docker rm cont script: - docker pull "$CI_REGISTRY_IMAGE:testing" - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing" - sleep 10 - docker exec cont cli/build/test/logintest_pos.sh - docker exec cont cli/build/test/logintest_neg.sh cli-cryptotest: stage: test before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY after_script: - docker stop cont - docker rm cont script: - docker pull "$CI_REGISTRY_IMAGE:testing" - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing" - sleep 10 - docker exec cont cli/build/test/cryptoput.sh /root/build/files - docker exec cont cli/build/test/cryptoget.sh /root/build/files