Continuous integration 停止并行运行Gitlab CI中的作业
有没有办法阻止gitlab CI中的作业并行运行? 我的gitlab-ci.yml文件是:Continuous integration 停止并行运行Gitlab CI中的作业,continuous-integration,gitlab,gitlab-ci,pipeline,jobs,Continuous Integration,Gitlab,Gitlab Ci,Pipeline,Jobs,有没有办法阻止gitlab CI中的作业并行运行? 我的gitlab-ci.yml文件是: image: google/cloud-sdk:slim stages: - deploy before_script: - echo $ENVIRONMENT - gcloud auth activate-service-account --key-file $GOOGLE_SERVICE_ACCOUNT_FILE - gcloud config set project $GOOG
image: google/cloud-sdk:slim
stages:
- deploy
before_script:
- echo $ENVIRONMENT
- gcloud auth activate-service-account --key-file $GOOGLE_SERVICE_ACCOUNT_FILE
- gcloud config set project $GOOGLE_PROJECT_ID
deploy_website:
stage: deploy
script:
- sed -i -e 's/https:\/\/us-central1-ahinko-website.cloudfunctions.net\/send_contact'/$GOOGLE_CLOUD_FUNCTION_EMAIL_URL'/g' src/client-side/js/custom-script.js
- gsutil -m rm $GOOGLE_CLOUD_BUCKET/**
- gsutil -m cp -R src/client-side/* $GOOGLE_CLOUD_BUCKET
environment:
name: $ENVIRONMENT
deploy_cloud_function:
stage: deploy
script:
- gcloud functions deploy send_contact --entry-point=send_contact_form --ingress-settings=all --runtime=python37 --source=src/server-side/cf-send-email/ --trigger-http
when: on_success
environment:
name: $ENVIRONMENT
两者并行运行,我不想这样。。
使用阶段:它们将按照
阶段
声明中定义的顺序执行
image: google/cloud-sdk:slim
stages:
- deploy
- cloud
before_script:
- echo $ENVIRONMENT
- gcloud auth activate-service-account --key-file $GOOGLE_SERVICE_ACCOUNT_FILE
- gcloud config set project $GOOGLE_PROJECT_ID
deploy_website:
stage: deploy
script:
- sed -i -e 's/https:\/\/us-central1-ahinko-website.cloudfunctions.net\/send_contact'/$GOOGLE_CLOUD_FUNCTION_EMAIL_URL'/g' src/client-side/js/custom-script.js
- gsutil -m rm $GOOGLE_CLOUD_BUCKET/**
- gsutil -m cp -R src/client-side/* $GOOGLE_CLOUD_BUCKET
environment:
name: $ENVIRONMENT
deploy_cloud_function:
stage: cloud
script:
- gcloud functions deploy send_contact --entry-point=send_contact_form --ingress-settings=all --runtime=python37 --source=src/server-side/cf-send-email/ --trigger-http
when: on_success
environment:
name: $ENVIRONMENT
非常感谢你!这就是解决办法!