fix(gitlab_release): All tasks run as part of script including user custom script
Job would suceed if anything failed in after_script. #1
This commit is contained in:
		| @ -14,10 +14,11 @@ include: | |||||||
|  |  | ||||||
|  |  | ||||||
| Gitlab Release: | Gitlab Release: | ||||||
|  |     variables: | ||||||
|  |         MY_COMMAND: ./sub-folder_changlog.sh | ||||||
|     extends: |     extends: | ||||||
|         - .gitlab_release |         - .gitlab_release | ||||||
|     script: |  | ||||||
|         - ./sub-folder_changlog.sh |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Github (Push --mirror): | Github (Push --mirror): | ||||||
|  | |||||||
| @ -23,8 +23,7 @@ | |||||||
|         - git push --set-upstream origin $CI_COMMIT_BRANCH |         - git push --set-upstream origin $CI_COMMIT_BRANCH | ||||||
|         - RELEASE_VERSION_CURRENT=$(cz -n cz_nfc version --project)         |         - RELEASE_VERSION_CURRENT=$(cz -n cz_nfc version --project)         | ||||||
|     script: |     script: | ||||||
|         - echo "your script here" |         - "$MY_COMMAND" | ||||||
|     after_script: |  | ||||||
|         - RELEASE_CHANGELOG=$(cz -n cz_nfc bump --changelog --changelog-to-stdout) |         - RELEASE_CHANGELOG=$(cz -n cz_nfc bump --changelog --changelog-to-stdout) | ||||||
|         - RELEASE_VERSION_NEW=$(cz -n cz_nfc version --project) |         - RELEASE_VERSION_NEW=$(cz -n cz_nfc version --project) | ||||||
|         - RELEASE_TAG=v$RELEASE_VERSION_NEW |         - RELEASE_TAG=v$RELEASE_VERSION_NEW | ||||||
| @ -37,6 +36,7 @@ | |||||||
|         - echo "[DEBUG] RELEASE_TAG_SHA1[$RELEASE_TAG_SHA1]" |         - echo "[DEBUG] RELEASE_TAG_SHA1[$RELEASE_TAG_SHA1]" | ||||||
|         - git push |         - git push | ||||||
|         - release-cli create --name "Release $RELEASE_TAG" --tag-name "$RELEASE_TAG" --ref "$RELEASE_TAG_SHA1" --description "$RELEASE_CHANGELOG" |         - release-cli create --name "Release $RELEASE_TAG" --tag-name "$RELEASE_TAG" --ref "$RELEASE_TAG_SHA1" --description "$RELEASE_CHANGELOG" | ||||||
|  |     after_script: | ||||||
|         - rm -Rf repo |         - rm -Rf repo | ||||||
|     rules: |     rules: | ||||||
|         - if: "$CI_COMMIT_AUTHOR =='NFC CI <CI@nfc-gitlab>'" |         - if: "$CI_COMMIT_AUTHOR =='NFC CI <CI@nfc-gitlab>'" | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user