variables: REGISTRY: registry.sensetime.com/cloudnative4ai VERSION: v1.0.1 PROJECT: di-orchestrator # dind config DOCKER_HOST: tcp://localhost:2376 DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_VERIFY: 1 DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" # each job's `before_script` will overwrite this global settings. # so, we'd better config only ONE global `before_script` here. before_script: # this is necessary. - export PATH="/go/bin:/root/go/bin:${PATH}" # set image name - export PROJECT_IMAGE="${REGISTRY}/${PROJECT}:${VERSION}-${CI_COMMIT_SHORT_SHA}" - export PROJECT_IMAGE_RELEASE="${REGISTRY}/${PROJECT}:${VERSION}" - export https_proxy=http://10.54.0.110:8080 stages: - lint - test - build - release lint: stage: lint image: ${PHOENIX_CI_IMAGE_NEW} tags: - cloudnative4ai-group-runner-phoenix script: - make lint unit-test: stage: test image: ${PHOENIX_CI_IMAGE_NEW} tags: - cloudnative4ai-group-runner-phoenix script: - unset https_proxy - curl -L https://download.phoenix.sensetime.com/mirrors/kubebuilder/v2.3.2/kubebuilder_2.3.2_linux_amd64.tar.gz | tar -xz -C /tmp/ - mv /tmp/kubebuilder_2.3.2_linux_amd64 /usr/local/kubebuilder - export PATH=$PATH:/usr/local/kubebuilder/bin - export https_proxy=http://10.54.0.110:8080 - make test build-manual: stage: build image: ${PHOENIX_CI_IMAGE_NEW} tags: - cloudnative4ai-group-runner-phoenix allow_failure: false when: manual services: - registry.sensetime.com/cloudnative4ai/docker:19.03.8-dind dependencies: - unit-test except: - master - develop - /^release.*$/ script: - make dev-images - make docker-push after_script: - docker image prune -f build-release: stage: build image: ${PHOENIX_CI_IMAGE_NEW} tags: - cloudnative4ai-group-runner-phoenix allow_failure: false services: - registry.sensetime.com/cloudnative4ai/docker:19.03.8-dind dependencies: - unit-test only: - master - develop - /^release.*$/ script: - make dev-images - make docker-push after_script: - docker image prune -f tag: stage: release image: ${PHOENIX_CI_IMAGE_NEW} tags: - cloudnative4ai-group-runner-phoenix services: - registry.sensetime.com/cloudnative4ai/docker:19.03.8-dind when: manual allow_failure: false dependencies: - build-release only: - master - /^release.*$/ script: - make docker-release after_script: - docker image prune -f