stages: - test - bundle - build - e2e variables: BITMASK_IMAGE: bitmask-dev:latest SOLEDAD_IMAGE: soledad:latest DOCKER_DRIVER: overlay linux_test: image: "${CI_REGISTRY_IMAGE}/${SOLEDAD_IMAGE}" stage: test script: - tox --recreate -e py27-dev tags: - linux osx_test: stage: test allow_failure: true script: - tox --recreate -e py27-dev tags: - osx bitmask_latest_bundle: image: "${CI_REGISTRY_IMAGE}/${BITMASK_IMAGE}" stage: bundle script: pkg/build_bundle_with_venv.sh artifacts: paths: - dist/bitmask-* name: "Bitmask_linux64_latest_${CI_BUILD_REF}" expire_in: 1 month tags: - linux build_ui: image: "${CI_REGISTRY_IMAGE}/${BITMASK_IMAGE}" stage: build script: - cd ui && make dev-build tags: - linux e2e_tests: image: "${CI_REGISTRY_IMAGE}/${BITMASK_IMAGE}" stage: e2e allow_failure: true script: - virtualenv venv - source venv/bin/activate - make dev-latest-backend - mkdir -p /root/.config/leap/ - apt install swaks - make test_e2e tags: - linux build_docker_image: image: "${CI_REGISTRY_IMAGE}/${BITMASK_IMAGE}" stage: test services: - docker:dind tags: - docker-in-docker before_script: - > export LAST_COMMIT=$(curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" ${CI_PROJECT_URL}/pipelines | python -c "import sys, json; print json.load(sys.stdin)[1]['sha']") script: - > if git diff $LAST_COMMIT HEAD --name-only|grep tests/docker; then docker --version docker info docker login -u gitlab-ci-token -e sysdev@leap.se -p $CI_JOB_TOKEN $CI_REGISTRY docker build -t ${CI_REGISTRY_IMAGE}:${BITMASK_IMAGE} tests/docker docker push ${CI_REGISTRY_IMAGE}:${BITMASK_IMAGE} fi