Schedule nightly builds#9717
Conversation
|
It looks like this contributor signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
| - beta | ||
| - tags | ||
| variables: | ||
| - $SCHEDULE_TAG == "nightly" |
There was a problem hiding this comment.
does this just return true if ref is nightly?
There was a problem hiding this comment.
It returns true if the variable $SCHEDULE_TAG is set to nightly, which will only be the case if this variable is explicitly set either in scheduleded builds or in manually triggered bulids.
For $CI_COMMIT_REF_NAME the behaviour will remain the same as before when pushing a nightly tag (but not needed anymore) - otherwise this variable will be the name of the branch which for scheduled nightly builds will be master.
| .collect_artifacts: &collect_artifacts | ||
| artifacts: | ||
| name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" | ||
| name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" |
There was a problem hiding this comment.
what happens if schedule_tag is empty?
There was a problem hiding this comment.
this is posix parameter expansion ':-' does return the value of the variable $SCHEDULE_TAG if set, otherwise the value of $CI_COMMIT_REF_NAME} will be given.
| then | ||
|
|
||
| case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in | ||
| (beta|stable|nightly) |
There was a problem hiding this comment.
for sure, tested :)
the value of the case statement is evaluated before matching the cases. but we can also keep the 3-fold if conditional if you like.
with this pr one can add a scheduled pipeline with gitlab for building nightly.
the scheduled pipeline has to have the $SCHEDULE_TAG variable set to nightly in order to make this work. after that no nightly tags on the repositories itself are needed anymore.