diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23205d51ce3e576463ae6072fb84700bb97e3a13..26c619f06d4de994c99add5d90a13e37d6fe7114 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/morph/grid/hro-cloud/grid.nix b/morph/grid/hro-cloud/grid.nix index 16fb1d4fde4e71e7aef103ef11dbceac04659d16..33a441cc0769428b7b7e448ee2a73b69f357eb39 100644 --- a/morph/grid/hro-cloud/grid.nix +++ b/morph/grid/hro-cloud/grid.nix @@ -24,7 +24,7 @@ let # Configure deployment management authorization for all systems in the grid. services.private-storage.deployment = { authorizedKey = builtins.readFile "${config.grid.publicKeyPath}/deploy_key.pub"; - gridName = "production"; + gridName = "hro-cloud"; }; }; payments = { diff --git a/nixos/modules/update-deployment b/nixos/modules/update-deployment index cd41a2363c699c7e551a33d73f1eb83996c1ca85..ddac57525caa1e07779ee686302bd6b4c83dcb24 100755 --- a/nixos/modules/update-deployment +++ b/nixos/modules/update-deployment @@ -17,6 +17,10 @@ case "${GRIDNAME}" in BRANCH="develop" ;; + "hro-cloud") + BRANCH="hro-cloud" + ;; + "production") BRANCH="production" ;;