variables: DOCKER_DRIVER: overlay APP_ID: 5b6bf491296f3600012f0788 CI_TOOL: "@teambition/ci-tool@3.8.1-alpha.0" TASK_ID: 5c38669d35f1580019eaeb6d before_script: - echo ${GITLAB_CI} - echo ${PORT} - node -v; npm -v; yarn -v - ls -la - yarn config set cache-folder /build-cache/.yarn - yarn config set @teambition:registry http://npm.dev22 --global - yarn global add ${CI_TOOL} --ignore-engines --prefer-offline --silent - ci-tool --version - yarn install --ignore-engines --prefer-offline services: - mongo:3.2.4 - redis:3.0.7 cache: paths: - node_modules stages: - build - check # - deploy # 需要运维支持 gilab ci runner 安装 kubectl - task - report build-test: stage: build before_script: - '' script: - yarn install - npm run build tags: - node8-docker # unit-test: # stage: test # script: # - npm run test_ci # tags: # - node8-docker check_commit_msg: stage: check before_script: - '' script: - sh bin/commit-msg-check.sh tags: - node8-docker only: - branches except: - master - release when: always # push_production: # stage: deploy # tags: # - docker-build # only: # - tags # script: # - yarn install # - export DOCKER_LOCAL_REGISTRY=registry.teambition.corp # - export DOCKER_PRODUCTION_REGISTRY=docker-registry.teambition.net # - export K8S_NAMESPACE=ng # - npm run deploy # - npm run deploy-prod task:release: stage: task tags: - node8-docker-tbcore script: - ci-tool task fork --id ${TASK_ID} --stage "br" --appEnv "br" --appEnv "release" --appEnv "us" --appName ${APP_ID} --rule 2 - ci-tool report message --template bin/deploy-msg.txt only: - /^v?\d+\.\d+\.\d+$/@apps/tb-import-export-server task:ga: stage: task tags: - node8-docker-tbcore script: - ci-tool task fork --id ${TASK_ID} --stage "ga" --appEnv "ga" --appName ${APP_ID} --rule 2 - ci-tool report message --template bin/deploy-msg.txt only: - /^v?\d+\.\d+\.\d+-(alpha|beta)\.\d+$/@apps/tb-import-export-server report:error: stage: report tags: - node8-docker-tbcore script: - ci-tool report error when: on_failure