image: "domaindrivenarchitecture/devops-build:latest" services: - docker:dind before_script: - python --version - python -m pip install --upgrade pip - pip install -r requirements.txt - export IMAGE_TAG=$CI_COMMIT_TAG - export IMAGE_DOCKERHUB_USER=$DOCKERHUB_USER - export IMAGE_DOCKERHUB_PASSWORD=$DOCKERHUB_PASSWORD stages: - lint&test - upload - image lint: stage: lint&test script: - pip install -r dev_requirements.txt - pyb lint pytest: stage: lint&test script: - pip install -r dev_requirements.txt - pyb test pypi-stable: stage: upload rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: never - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - pyb -P version=$CI_COMMIT_TAG publish upload clojure-image-test-publish: stage: image rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: never - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - cd infrastructure/clojure && pyb image test publish devops-build-image-test-publish: stage: image rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: never - if: '$CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/' script: - cd infrastructure/devops-build && pyb image test publish