-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Schedule nightly builds #9717
Schedule nightly builds #9717
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,13 +21,17 @@ cache: | |
|
|
||
| .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") | ||
| only: &releaseable_branches | ||
| - stable | ||
| - beta | ||
| - tags | ||
| refs: | ||
| - stable | ||
| - beta | ||
| - tags | ||
| variables: | ||
| - $SCHEDULE_TAG == "nightly" | ||
|
|
||
|
|
||
| .collect_artifacts: &collect_artifacts | ||
| artifacts: | ||
| name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" | ||
| name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens if schedule_tag is empty?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| when: on_success | ||
| expire_in: 1 mos | ||
| paths: | ||
|
|
@@ -37,7 +41,7 @@ cache: | |
| - VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)" | ||
| - DATE_STR="$(date +%Y%m%d)" | ||
| - ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)" | ||
| - test "${CI_COMMIT_REF_NAME}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}" | ||
| - test "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}" | ||
| - export VERSION | ||
| - echo "Version = ${VERSION}" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,10 +7,10 @@ echo "__________Register Release__________" | |
| DATA="secret=$RELEASES_SECRET" | ||
|
|
||
| echo "Pushing release to Mainnet" | ||
| ./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA" | ||
| ./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA" | ||
|
|
||
| echo "Pushing release to Kovan" | ||
| ./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA" | ||
| ./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA" | ||
|
|
||
| cd artifacts | ||
| ls -l | sort -k9 | ||
|
|
@@ -29,9 +29,9 @@ do | |
| case $DIR in | ||
| x86_64* ) | ||
| DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET" | ||
| ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_COMMIT_REF_NAME/$DIR" | ||
| ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR" | ||
| # Kovan | ||
| ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_COMMIT_REF_NAME/$DIR" | ||
| ../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR" | ||
| ;; | ||
| esac | ||
| cd .. | ||
|
|
@@ -40,10 +40,15 @@ done | |
| echo "__________Push binaries to AWS S3____________" | ||
| aws configure set aws_access_key_id $s3_key | ||
| aws configure set aws_secret_access_key $s3_secret | ||
| if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" || "$CI_COMMIT_REF_NAME" = "nightly" ]]; | ||
| then | ||
|
|
||
| case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in | ||
| (beta|stable|nightly) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is that even possible?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for sure, tested :) |
||
| export S3_BUCKET=builds-parity-published; | ||
| else | ||
| ;; | ||
| (*) | ||
| export S3_BUCKET=builds-parity; | ||
| fi | ||
| aws s3 sync ./ s3://$S3_BUCKET/$CI_COMMIT_REF_NAME/ | ||
| ;; | ||
| esac | ||
|
|
||
| aws s3 sync ./ s3://$S3_BUCKET/${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.
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.