.gitlab-ci.yml: Skip main build after stage build
Two reasons for this: 1. It's unnecessary, since it's the same ref, so long as we actually build everything as part of the stage job; and 2. In our environment, the token used doesn't have access to pull from the registry. Fixing the latter item can be done at another time.main
parent
f0ca3e88b7
commit
2821098b40
|
@ -52,6 +52,7 @@ pages:
|
|||
expire_in: 30 min
|
||||
only:
|
||||
- main
|
||||
- stage
|
||||
|
||||
ci:merge:
|
||||
stage: deploy
|
||||
|
@ -61,8 +62,9 @@ ci:merge:
|
|||
- git checkout main
|
||||
- git reset --hard origin/main
|
||||
- git merge --ff origin/stage
|
||||
# This will trigger main pipeline after pushing
|
||||
- git push http://ci:$STAGE_MERGE_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:main
|
||||
# Do not trigger the pipeline after pushing; there's no use in
|
||||
# re-doing the work we just did, since the merge is a fast-forward.
|
||||
- git push -o ci.skip http://ci:$STAGE_MERGE_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:main
|
||||
only:
|
||||
- stage
|
||||
|
||||
|
|
Loading…
Reference in New Issue