From dfbae454efbaaa7c2cb8167e99238818d5be5d4a Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Mon, 10 Jun 2024 13:39:24 -0500 Subject: [PATCH 1/3] move the quay image expiration value to a setting in rickshaw-settings.json - this allows for the value to be easily changed in a trackable manner --- rickshaw-run | 10 +++++++++- rickshaw-settings.json | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rickshaw-run b/rickshaw-run index b3cabe85..c4d541ce 100755 --- a/rickshaw-run +++ b/rickshaw-run @@ -118,6 +118,7 @@ my $roadblock_exit_abort_waiting = 6; my $abort_via_roadblock = 0; my $workshop_base_cmd; my $workshop_force_builds; +my $quay_image_expiration; my $cs_conf_file; my %cs_conf; @@ -1723,6 +1724,13 @@ sub load_settings_info() { print "load_settings_info(): failed to load workshop force\n"; exit 1; } + + ($rc, $quay_image_expiration) = get_json_setting("quay.image-expiration", $jsonsettings); + if ($rc != 0) { + print "load_settings_info(): failed to load quay image-expiration\n"; + exit 1; + } + printf "Finished loading json settings\n"; } @@ -2835,7 +2843,7 @@ $cs_conf_file = $config_dir . "/cs-conf.json"; }, 'config' => { 'entrypoint' => [ "/bin/sh", "-c", "/usr/local/bin/bootstrap" ], - 'labels' => [ 'quay.expires-after=2w' ], + 'labels' => [ 'quay.expires-after=' . $quay_image_expiration ], 'envs' => [ 'TOOLBOX_HOME=/opt/toolbox' ] } ); diff --git a/rickshaw-settings.json b/rickshaw-settings.json index e7d9c8a5..311883e3 100644 --- a/rickshaw-settings.json +++ b/rickshaw-settings.json @@ -21,5 +21,8 @@ }, "workshop": { "force-builds": "false" + }, + "quay": { + "image-expiration": "2w" } } From 51eb7aa8e3ade7b16674ba59d53d795bb9c4524a Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Mon, 10 Jun 2024 13:40:47 -0500 Subject: [PATCH 2/3] update the crucible-ci workflow --- .github/workflows/crucible-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crucible-ci.yaml b/.github/workflows/crucible-ci.yaml index 8169d808..881f7a99 100644 --- a/.github/workflows/crucible-ci.yaml +++ b/.github/workflows/crucible-ci.yaml @@ -21,4 +21,4 @@ jobs: ci_target_branch: "${{ github.ref }}" github_workspace: "$GITHUB_WORKSPACE" secrets: - registry_auth: ${{ secrets.CRUCIBLE_CI_ENGINES_REGISTRY_AUTH }} + ci_registry_auth: ${{ secrets.CRUCIBLE_CI_ENGINES_REGISTRY_AUTH }} From 15d1f1a652790f9773a938660ac1584d3183f142 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Mon, 10 Jun 2024 13:41:33 -0500 Subject: [PATCH 3/3] add a new github workflow to run when PRs are merged - this workflow should result in userenv images that are built and pushed to the production quay.io repo --- .github/workflows/crucible-merged.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/crucible-merged.yaml diff --git a/.github/workflows/crucible-merged.yaml b/.github/workflows/crucible-merged.yaml new file mode 100644 index 00000000..a54b8791 --- /dev/null +++ b/.github/workflows/crucible-merged.yaml @@ -0,0 +1,26 @@ +name: crucible-merged + +on: + pull_request_target: + types: [ closed ] + branches: [ master ] + paths-ignore: + - LICENSE + - '**.md' + - .github/workflows/faux-unittest.yaml + - .github/workflows/faux-crucible-ci.yaml + - 'docs/**' + - engine/engine-script-library.py + - engine/engine-script.py + workflow_dispatch: + +jobs: + call-core-crucible-ci_if-merged: + if: github.event.pull_request.merged == true + uses: perftool-incubator/crucible-ci/.github/workflows/core-crucible-ci.yaml@main + with: + ci_target: "rickshaw" + ci_target_branch: "master" + github_workspace: "$GITHUB_WORKSPACE" + secrets: + production_registry_auth: ${{ secrets.CRUCIBLE_PRODUCTION_ENGINES_REGISTRY_AUTH }}