Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Schedule nightly builds #9717

Merged
merged 2 commits into from Oct 9, 2018
Merged

Schedule nightly builds #9717

merged 2 commits into from Oct 9, 2018

Conversation

gabreal
Copy link
Contributor

@gabreal gabreal commented Oct 8, 2018

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.

@parity-cla-bot
Copy link

It looks like this contributor signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

- beta
- tags
variables:
- $SCHEDULE_TAG == "nightly"
Copy link
Contributor

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?

Copy link
Contributor Author

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}}"
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that even possible?

Copy link
Contributor Author

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.

@5chdn 5chdn added this to the 2.2 milestone Oct 8, 2018
@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. M1-ci 🙉 Continuous integration. labels Oct 8, 2018
Copy link
Contributor

@5chdn 5chdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 👍

@5chdn 5chdn merged commit 5a8fb77 into master Oct 9, 2018
@5chdn 5chdn deleted the schedule-nightly-builds branch October 9, 2018 13:32
dvdplm added a commit that referenced this pull request Oct 9, 2018
…mon-deps

* origin/master:
  Schedule nightly builds (#9717)
  Fix ancient blocks sync (#9531)
  CI: Skip docs job for nightly (#9693)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review. M1-ci 🙉 Continuous integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants