diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23205d51ce3e576463ae6072fb84700bb97e3a13..1f037fbf9603b91a3f511c290c9ec65b2bcca914 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -169,7 +169,7 @@ deploy-to-production: name: "production" url: "https://monitoring.private.storage/" -# Update the hro-cloud deployment - just like above for production (same branch). +# Update the hro-cloud deployment - only on a commit to the hro-cloud branch. deploy-to-hro-cloud: <<: *UPDATE_GRID @@ -178,7 +178,7 @@ deploy-to-hro-cloud: # https://docs.gitlab.com/ee/ci/yaml/index.html#rulesif # https://docs.gitlab.com/ee/ci/jobs/job_control.html#cicd-variable-expressions # https://docs.gitlab.com/ee/ci/variables/predefined_variables.html - - if: '$CI_COMMIT_BRANCH == "production"' + - if: '$CI_COMMIT_BRANCH == "hro-cloud"' environment: # See notes in `update-staging`. @@ -208,3 +208,14 @@ update-production: "$CI_PROJECT_ID" \ "develop" \ "production" + +update-hro-cloud: + <<: *RUN_ON_SCHEDULE + stage: "build" + script: + - | + ./ci-tools/update-production \ + "$CI_SERVER_URL" \ + "$CI_PROJECT_ID" \ + "develop" \ + "hro-cloud" diff --git a/ci-tools/update-production b/ci-tools/update-production index 7892bce0922075188e92110d1b289528b2b51b22..a3c4cd64cf3f343b76a552e56bc3854d8270f2c7 100755 --- a/ci-tools/update-production +++ b/ci-tools/update-production @@ -78,8 +78,8 @@ describe_update() { local TARGET_BRANCH=$1 shift - # Since production production (target) should not diverge from develop - # (source) it is fine to use `..` instead of `...` in the git ranges here. + # Since the target (production or hro-cloud) should not diverge from the source + # (develop) it is fine to use `..` instead of `...` in the git ranges here. # `...` encounters problems related to discovering the merge base because # of the way GitLab manages the git checkout on CI (I think). diff --git a/nixos/modules/update-deployment b/nixos/modules/update-deployment index 5ed8fed5842b40eebd2d15ed7982f6c8a9c3adea..ddac57525caa1e07779ee686302bd6b4c83dcb24 100755 --- a/nixos/modules/update-deployment +++ b/nixos/modules/update-deployment @@ -18,7 +18,7 @@ case "${GRIDNAME}" in ;; "hro-cloud") - BRANCH="production" + BRANCH="hro-cloud" ;; "production")