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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this just return true if ref is nightly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if schedule_tag is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that even possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing 👍
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.