当我的分支收到合并请求时,我想在Gitlab上自动运行我的部署作业。我该怎么做?
deploy-tests:
tags:
- aws-sdk
stage: deploy
only:
- stage
cache: {}
script:
- cd ngapp
- call npm ci
- call npm run-script i18n
- call npm run-script lint
- call build.bat tests
- copy .htaccess dist
- copy Web.config dist
- deploy.bat tests发布于 2022-02-01 18:08:41
如果希望在管道接收到MR.时执行它,则需要在merge_requests子句处传递关键字only。(https://docs.gitlab.com/ee/ci/yaml/#onlyrefs--exceptrefs)变化
deploy-tests:
tags:
- aws-sdk
stage: deploy
only:
- stage
cache: {}
script:
- cd ngapp
...至
deploy-tests:
tags:
- aws-sdk
stage: deploy
only:
- merge_requests
- stage
cache: {}
script:
- cd ngapp
...https://stackoverflow.com/questions/70926327
复制相似问题