From f6b786943755e47038e9f1d5420b713275f63118 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:00:27 +0200 Subject: [PATCH 01/23] chore(deps): update public.ecr.aws/ubuntu/ubuntu:focal docker digest to 036c51f (#244) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/base_digests/20.04 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/base_digests/20.04 b/.github/base_digests/20.04 index 04635c16..05843afe 100644 --- a/.github/base_digests/20.04 +++ b/.github/base_digests/20.04 @@ -1 +1 @@ -public.ecr.aws/ubuntu/ubuntu:focal@sha256:f80053be8041fea27b329b31c96e8177cd3922ef748a246dc55f651fefdee537 +public.ecr.aws/ubuntu/ubuntu:focal@sha256:036c51fb190af9d3ec7fbd654c2669d5a3da3549aa0e3408b40ba6fb6eb16dfc From 23bf7255233a146fcd8c3301dc53b43814b8c3a5 Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Thu, 19 Sep 2024 19:25:38 +0200 Subject: [PATCH 02/23] fix: checkout oci-factory repo before actor validation (#245) --- .github/workflows/Build-Rock.yaml | 22 ++++++++++++++-------- oci/mock-rock/_releases.json | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/Build-Rock.yaml b/.github/workflows/Build-Rock.yaml index b53d4086..bec32ec5 100644 --- a/.github/workflows/Build-Rock.yaml +++ b/.github/workflows/Build-Rock.yaml @@ -38,6 +38,20 @@ jobs: build-for: ${{ steps.rock-platforms.outputs.build-for }} build-with-lpci: ${{ steps.rock-platforms.outputs.build-with-lpci }} steps: + # Checkout the OCI Factory repo for the actor validation + - uses: actions/checkout@v4 + if: ${{ github.repository == 'canonical/oci-factory' }} + + - name: Validate access to triggered image + uses: ./.github/actions/validate-actor + if: ${{ github.repository == 'canonical/oci-factory' }} + with: + admin-only: true + image-path: ${{ inputs.oci-factory-path }} + github-token: ${{ secrets.ROCKSBOT_TOKEN }} + + - run: rm -rf ./* + - name: Clone GitHub image repository uses: actions/checkout@v4 id: clone-image-repo @@ -50,14 +64,6 @@ jobs: run: | git clone ${{ inputs.rock-repo }} . - - name: Validate access to triggered image - uses: ./.github/actions/validate-actor - if: ${{ github.repository == 'canonical/oci-factory' }} - with: - admin-only: true - image-path: ${{ inputs.oci-factory-path }} - github-token: ${{ secrets.ROCKSBOT_TOKEN }} - - run: git checkout ${{ inputs.rock-repo-commit }} - run: sudo snap install yq --channel=v4/stable diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index 0740e939..c63ff6d4 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -13,13 +13,13 @@ }, "1.0-22.04": { "candidate": { - "target": "533" + "target": "547" }, "beta": { - "target": "533" + "target": "547" }, "edge": { - "target": "533" + "target": "547" }, "end-of-life": "2025-05-01T00:00:00Z" }, @@ -35,31 +35,31 @@ "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "534" + "target": "548" }, "beta": { - "target": "534" + "target": "548" }, "edge": { - "target": "534" + "target": "548" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "534" + "target": "548" }, "beta": { - "target": "534" + "target": "548" }, "edge": { - "target": "534" + "target": "548" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "535" + "target": "549" }, "edge": { "target": "1.2-22.04_beta" From ce8656763cdafbe17fee9fd88407a4152df32b58 Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 17:38:10 +0000 Subject: [PATCH 03/23] ci: automatically update oci/python/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10945959921 --- oci/python/_releases.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oci/python/_releases.json b/oci/python/_releases.json index 815cefe8..59dc66b8 100644 --- a/oci/python/_releases.json +++ b/oci/python/_releases.json @@ -1,17 +1,17 @@ { "3.8-20.04": { "edge": { - "target": "39" + "target": "43" }, "end-of-life": "2025-03-31T00:00:00Z", "stable": { - "target": "39" + "target": "43" }, "candidate": { - "target": "39" + "target": "43" }, "beta": { - "target": "39" + "target": "43" } }, "3.12-24.04": { From ddd5be2840d405f15cd11528aa287dcb5aca3e18 Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 19:39:11 +0000 Subject: [PATCH 04/23] ci: automatically update oci/python/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10947626697 --- oci/python/_releases.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oci/python/_releases.json b/oci/python/_releases.json index 59dc66b8..81a7a9f5 100644 --- a/oci/python/_releases.json +++ b/oci/python/_releases.json @@ -17,16 +17,16 @@ "3.12-24.04": { "end-of-life": "2029-03-31T00:00:00Z", "edge": { - "target": "42" + "target": "45" }, "stable": { - "target": "42" + "target": "45" }, "candidate": { - "target": "42" + "target": "45" }, "beta": { - "target": "42" + "target": "45" } }, "3.10-22.04": { From 0f85b962de46dbd0eb030c10afbb2f241d069a7a Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 19:39:16 +0000 Subject: [PATCH 05/23] ci: automatically update oci/mock-rock/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10947609694 --- oci/mock-rock/_releases.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index c63ff6d4..fe89e851 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -1,68 +1,68 @@ { "latest": { "candidate": { - "target": "1.0-22.04_candidate" + "target": "550" }, "beta": { - "target": "latest_candidate" + "target": "550" }, "edge": { - "target": "latest_beta" + "target": "550" }, "end-of-life": "2025-05-01T00:00:00Z" }, "1.0-22.04": { "candidate": { - "target": "547" + "target": "550" }, "beta": { - "target": "547" + "target": "550" }, "edge": { - "target": "547" + "target": "550" }, "end-of-life": "2025-05-01T00:00:00Z" }, "test": { "beta": { - "target": "1.0-22.04_beta" + "target": "550" }, "edge": { - "target": "test_beta" + "target": "550" }, "end-of-life": "2026-05-01T00:00:00Z" }, "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "548" + "target": "551" }, "beta": { - "target": "548" + "target": "551" }, "edge": { - "target": "548" + "target": "551" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "548" + "target": "551" }, "beta": { - "target": "548" + "target": "551" }, "edge": { - "target": "548" + "target": "551" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "549" + "target": "552" }, "edge": { - "target": "1.2-22.04_beta" + "target": "552" } } } \ No newline at end of file From 1bc36910387d33f7ad1a841a6540c6bc2ac10dce Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 19:40:01 +0000 Subject: [PATCH 06/23] ci: automatically update oci/alertmanager/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10947609833 --- oci/alertmanager/_releases.json | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/oci/alertmanager/_releases.json b/oci/alertmanager/_releases.json index 477b32dc..63df551e 100644 --- a/oci/alertmanager/_releases.json +++ b/oci/alertmanager/_releases.json @@ -1,107 +1,107 @@ { "0.25.0-22.04": { "stable": { - "target": "53" + "target": "56" }, "candidate": { - "target": "53" + "target": "56" }, "beta": { - "target": "53" + "target": "56" }, "edge": { - "target": "53" + "target": "56" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.25-22.04": { "stable": { - "target": "53" + "target": "56" }, "candidate": { - "target": "53" + "target": "56" }, "beta": { - "target": "53" + "target": "56" }, "edge": { - "target": "53" + "target": "56" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0-22.04": { "stable": { - "target": "55" + "target": "58" }, "candidate": { - "target": "55" + "target": "58" }, "beta": { - "target": "55" + "target": "58" }, "edge": { - "target": "55" + "target": "58" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.26.0-22.04": { "stable": { - "target": "54" + "target": "57" }, "candidate": { - "target": "54" + "target": "57" }, "beta": { - "target": "54" + "target": "57" }, "edge": { - "target": "54" + "target": "57" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.26-22.04": { "stable": { - "target": "54" + "target": "57" }, "candidate": { - "target": "54" + "target": "57" }, "beta": { - "target": "54" + "target": "57" }, "edge": { - "target": "54" + "target": "57" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.27.0-22.04": { "end-of-life": "2025-03-13T00:00:00Z", "stable": { - "target": "55" + "target": "58" }, "candidate": { - "target": "55" + "target": "58" }, "beta": { - "target": "55" + "target": "58" }, "edge": { - "target": "55" + "target": "58" } }, "0.27-22.04": { "end-of-life": "2025-03-13T00:00:00Z", "stable": { - "target": "55" + "target": "58" }, "candidate": { - "target": "55" + "target": "58" }, "beta": { - "target": "55" + "target": "58" }, "edge": { - "target": "55" + "target": "58" } } } \ No newline at end of file From 56044c10d3b3623f0ea1c636d380067671eaa8fa Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 19:41:47 +0000 Subject: [PATCH 07/23] ci: automatically update oci/prometheus-pushgateway/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10947609380 --- oci/prometheus-pushgateway/_releases.json | 72 +++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/oci/prometheus-pushgateway/_releases.json b/oci/prometheus-pushgateway/_releases.json index fb9dd1ee..ea8cb669 100644 --- a/oci/prometheus-pushgateway/_releases.json +++ b/oci/prometheus-pushgateway/_releases.json @@ -1,137 +1,137 @@ { "1.6.2-22.04": { "stable": { - "target": "87" + "target": "94" }, "candidate": { - "target": "87" + "target": "94" }, "beta": { - "target": "87" + "target": "94" }, "edge": { - "target": "87" + "target": "94" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.6-22.04": { "stable": { - "target": "86" + "target": "93" }, "candidate": { - "target": "86" + "target": "93" }, "beta": { - "target": "86" + "target": "93" }, "edge": { - "target": "86" + "target": "93" }, "end-of-life": "2025-03-14T00:00:00Z" }, "1-22.04": { "stable": { - "target": "90" + "target": "97" }, "candidate": { - "target": "90" + "target": "97" }, "beta": { - "target": "90" + "target": "97" }, "edge": { - "target": "90" + "target": "97" }, "end-of-life": "2025-05-28T00:00:00Z" }, "1.6.1-22.04": { "stable": { - "target": "85" + "target": "92" }, "candidate": { - "target": "85" + "target": "92" }, "beta": { - "target": "85" + "target": "92" }, "edge": { - "target": "85" + "target": "92" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.6.0-22.04": { "stable": { - "target": "84" + "target": "91" }, "candidate": { - "target": "84" + "target": "91" }, "beta": { - "target": "84" + "target": "91" }, "edge": { - "target": "84" + "target": "91" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.7.0-22.04": { "stable": { - "target": "89" + "target": "96" }, "candidate": { - "target": "89" + "target": "96" }, "beta": { - "target": "89" + "target": "96" }, "edge": { - "target": "89" + "target": "96" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.7-22.04": { "stable": { - "target": "88" + "target": "95" }, "candidate": { - "target": "88" + "target": "95" }, "beta": { - "target": "88" + "target": "95" }, "edge": { - "target": "88" + "target": "95" }, "end-of-life": "2025-03-14T00:00:00Z" }, "1.8.0-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "90" + "target": "97" }, "candidate": { - "target": "90" + "target": "97" }, "beta": { - "target": "90" + "target": "97" }, "edge": { - "target": "90" + "target": "97" } }, "1.8-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "90" + "target": "97" }, "candidate": { - "target": "90" + "target": "97" }, "beta": { - "target": "90" + "target": "97" }, "edge": { - "target": "90" + "target": "97" } } } \ No newline at end of file From 65a44c7a9a4d011cf5b1aa4380bbe96e54af3cbb Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Thu, 19 Sep 2024 19:54:24 +0000 Subject: [PATCH 08/23] ci: automatically update oci/mimir/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10947611507 --- oci/mimir/_releases.json | 80 ++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/oci/mimir/_releases.json b/oci/mimir/_releases.json index c71671f8..a8fcf101 100644 --- a/oci/mimir/_releases.json +++ b/oci/mimir/_releases.json @@ -1,152 +1,152 @@ { "2.6.0-22.04": { "stable": { - "target": "92" + "target": "99" }, "candidate": { - "target": "92" + "target": "99" }, "beta": { - "target": "92" + "target": "99" }, "edge": { - "target": "92" + "target": "99" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.6-22.04": { "stable": { - "target": "92" + "target": "99" }, "candidate": { - "target": "92" + "target": "99" }, "beta": { - "target": "92" + "target": "99" }, "edge": { - "target": "92" + "target": "99" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2-22.04": { "stable": { - "target": "91" + "target": "98" }, "candidate": { - "target": "91" + "target": "98" }, "beta": { - "target": "91" + "target": "98" }, "edge": { - "target": "91" + "target": "98" }, "end-of-life": "2025-05-28T00:00:00Z" }, "2.10.4-22.04": { "stable": { - "target": "88" + "target": "95" }, "candidate": { - "target": "88" + "target": "95" }, "beta": { - "target": "88" + "target": "95" }, "edge": { - "target": "88" + "target": "95" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.10-22.04": { "stable": { - "target": "87" + "target": "94" }, "candidate": { - "target": "87" + "target": "94" }, "beta": { - "target": "87" + "target": "94" }, "edge": { - "target": "87" + "target": "94" }, "end-of-life": "2025-03-14T00:00:00Z" }, "2.10.0-22.04": { "stable": { - "target": "86" + "target": "93" }, "candidate": { - "target": "86" + "target": "93" }, "beta": { - "target": "86" + "target": "93" }, "edge": { - "target": "86" + "target": "93" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.11.0-22.04": { "stable": { - "target": "90" + "target": "97" }, "candidate": { - "target": "90" + "target": "97" }, "beta": { - "target": "90" + "target": "97" }, "edge": { - "target": "90" + "target": "97" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.11-22.04": { "stable": { - "target": "89" + "target": "96" }, "candidate": { - "target": "89" + "target": "96" }, "beta": { - "target": "89" + "target": "96" }, "edge": { - "target": "89" + "target": "96" }, "end-of-life": "2025-03-14T00:00:00Z" }, "2.12.0-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "91" + "target": "98" }, "candidate": { - "target": "91" + "target": "98" }, "beta": { - "target": "91" + "target": "98" }, "edge": { - "target": "91" + "target": "98" } }, "2.12-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "91" + "target": "98" }, "candidate": { - "target": "91" + "target": "98" }, "beta": { - "target": "91" + "target": "98" }, "edge": { - "target": "91" + "target": "98" } } } \ No newline at end of file From 0ba08f8a2a9a1c3d72bc2c45f81c7cc8a727105a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:24:28 +0200 Subject: [PATCH 09/23] chore(deps): update public.ecr.aws/ubuntu/ubuntu:jammy docker digest to 1582c29 (#239) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/base_digests/22.04 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/base_digests/22.04 b/.github/base_digests/22.04 index 31a12386..a911a392 100644 --- a/.github/base_digests/22.04 +++ b/.github/base_digests/22.04 @@ -1,2 +1,2 @@ -public.ecr.aws/ubuntu/ubuntu:jammy@sha256:606a9e0ca22a44f8956dcb463ab4daba5d50c100ea8075d3c24a2bddd161d320 +public.ecr.aws/ubuntu/ubuntu:jammy@sha256:1582c29f34a48752e406f1a261fe9545fad895da3f6bb4be55bc82485557564e From 0cb959f7d82a8ac0212e977559f501d1b27b4f1d Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Fri, 20 Sep 2024 16:36:43 +0000 Subject: [PATCH 10/23] ci: automatically update oci/mock-rock/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10962847864 --- oci/mock-rock/_releases.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index fe89e851..6d3a095b 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -1,68 +1,68 @@ { "latest": { "candidate": { - "target": "550" + "target": "553" }, "beta": { - "target": "550" + "target": "553" }, "edge": { - "target": "550" + "target": "553" }, "end-of-life": "2025-05-01T00:00:00Z" }, "1.0-22.04": { "candidate": { - "target": "550" + "target": "553" }, "beta": { - "target": "550" + "target": "553" }, "edge": { - "target": "550" + "target": "553" }, "end-of-life": "2025-05-01T00:00:00Z" }, "test": { "beta": { - "target": "550" + "target": "553" }, "edge": { - "target": "550" + "target": "553" }, "end-of-life": "2026-05-01T00:00:00Z" }, "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "551" + "target": "554" }, "beta": { - "target": "551" + "target": "554" }, "edge": { - "target": "551" + "target": "554" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "551" + "target": "554" }, "beta": { - "target": "551" + "target": "554" }, "edge": { - "target": "551" + "target": "554" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "552" + "target": "555" }, "edge": { - "target": "552" + "target": "555" } } } \ No newline at end of file From 4b54d3099ae5f1bb994ac955cdc85638323d1bae Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Fri, 20 Sep 2024 16:38:10 +0000 Subject: [PATCH 11/23] ci: automatically update oci/alertmanager/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10962848528 --- oci/alertmanager/_releases.json | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/oci/alertmanager/_releases.json b/oci/alertmanager/_releases.json index 63df551e..ae39e36d 100644 --- a/oci/alertmanager/_releases.json +++ b/oci/alertmanager/_releases.json @@ -1,107 +1,107 @@ { "0.25.0-22.04": { "stable": { - "target": "56" + "target": "59" }, "candidate": { - "target": "56" + "target": "59" }, "beta": { - "target": "56" + "target": "59" }, "edge": { - "target": "56" + "target": "59" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.25-22.04": { "stable": { - "target": "56" + "target": "59" }, "candidate": { - "target": "56" + "target": "59" }, "beta": { - "target": "56" + "target": "59" }, "edge": { - "target": "56" + "target": "59" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0-22.04": { "stable": { - "target": "58" + "target": "61" }, "candidate": { - "target": "58" + "target": "61" }, "beta": { - "target": "58" + "target": "61" }, "edge": { - "target": "58" + "target": "61" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.26.0-22.04": { "stable": { - "target": "57" + "target": "60" }, "candidate": { - "target": "57" + "target": "60" }, "beta": { - "target": "57" + "target": "60" }, "edge": { - "target": "57" + "target": "60" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.26-22.04": { "stable": { - "target": "57" + "target": "60" }, "candidate": { - "target": "57" + "target": "60" }, "beta": { - "target": "57" + "target": "60" }, "edge": { - "target": "57" + "target": "60" }, "end-of-life": "2025-03-13T00:00:00Z" }, "0.27.0-22.04": { "end-of-life": "2025-03-13T00:00:00Z", "stable": { - "target": "58" + "target": "61" }, "candidate": { - "target": "58" + "target": "61" }, "beta": { - "target": "58" + "target": "61" }, "edge": { - "target": "58" + "target": "61" } }, "0.27-22.04": { "end-of-life": "2025-03-13T00:00:00Z", "stable": { - "target": "58" + "target": "61" }, "candidate": { - "target": "58" + "target": "61" }, "beta": { - "target": "58" + "target": "61" }, "edge": { - "target": "58" + "target": "61" } } } \ No newline at end of file From 1dbbfbe5be10a5ad1e2629fe8a8ee488aa163877 Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Fri, 20 Sep 2024 16:38:17 +0000 Subject: [PATCH 12/23] ci: automatically update oci/prometheus-pushgateway/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10962846627 --- oci/prometheus-pushgateway/_releases.json | 72 +++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/oci/prometheus-pushgateway/_releases.json b/oci/prometheus-pushgateway/_releases.json index ea8cb669..96748829 100644 --- a/oci/prometheus-pushgateway/_releases.json +++ b/oci/prometheus-pushgateway/_releases.json @@ -1,137 +1,137 @@ { "1.6.2-22.04": { "stable": { - "target": "94" + "target": "101" }, "candidate": { - "target": "94" + "target": "101" }, "beta": { - "target": "94" + "target": "101" }, "edge": { - "target": "94" + "target": "101" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.6-22.04": { "stable": { - "target": "93" + "target": "100" }, "candidate": { - "target": "93" + "target": "100" }, "beta": { - "target": "93" + "target": "100" }, "edge": { - "target": "93" + "target": "100" }, "end-of-life": "2025-03-14T00:00:00Z" }, "1-22.04": { "stable": { - "target": "97" + "target": "104" }, "candidate": { - "target": "97" + "target": "104" }, "beta": { - "target": "97" + "target": "104" }, "edge": { - "target": "97" + "target": "104" }, "end-of-life": "2025-05-28T00:00:00Z" }, "1.6.1-22.04": { "stable": { - "target": "92" + "target": "99" }, "candidate": { - "target": "92" + "target": "99" }, "beta": { - "target": "92" + "target": "99" }, "edge": { - "target": "92" + "target": "99" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.6.0-22.04": { "stable": { - "target": "91" + "target": "98" }, "candidate": { - "target": "91" + "target": "98" }, "beta": { - "target": "91" + "target": "98" }, "edge": { - "target": "91" + "target": "98" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.7.0-22.04": { "stable": { - "target": "96" + "target": "103" }, "candidate": { - "target": "96" + "target": "103" }, "beta": { - "target": "96" + "target": "103" }, "edge": { - "target": "96" + "target": "103" }, "end-of-life": "2025-05-24T00:00:00Z" }, "1.7-22.04": { "stable": { - "target": "95" + "target": "102" }, "candidate": { - "target": "95" + "target": "102" }, "beta": { - "target": "95" + "target": "102" }, "edge": { - "target": "95" + "target": "102" }, "end-of-life": "2025-03-14T00:00:00Z" }, "1.8.0-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "97" + "target": "104" }, "candidate": { - "target": "97" + "target": "104" }, "beta": { - "target": "97" + "target": "104" }, "edge": { - "target": "97" + "target": "104" } }, "1.8-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "97" + "target": "104" }, "candidate": { - "target": "97" + "target": "104" }, "beta": { - "target": "97" + "target": "104" }, "edge": { - "target": "97" + "target": "104" } } } \ No newline at end of file From 609c901a676ed9bf5217e7e083df7cbd2e9ba137 Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Fri, 20 Sep 2024 16:49:50 +0000 Subject: [PATCH 13/23] ci: automatically update oci/mimir/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10962846442 --- oci/mimir/_releases.json | 80 ++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/oci/mimir/_releases.json b/oci/mimir/_releases.json index a8fcf101..822d1fa4 100644 --- a/oci/mimir/_releases.json +++ b/oci/mimir/_releases.json @@ -1,152 +1,152 @@ { "2.6.0-22.04": { "stable": { - "target": "99" + "target": "106" }, "candidate": { - "target": "99" + "target": "106" }, "beta": { - "target": "99" + "target": "106" }, "edge": { - "target": "99" + "target": "106" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.6-22.04": { "stable": { - "target": "99" + "target": "106" }, "candidate": { - "target": "99" + "target": "106" }, "beta": { - "target": "99" + "target": "106" }, "edge": { - "target": "99" + "target": "106" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2-22.04": { "stable": { - "target": "98" + "target": "105" }, "candidate": { - "target": "98" + "target": "105" }, "beta": { - "target": "98" + "target": "105" }, "edge": { - "target": "98" + "target": "105" }, "end-of-life": "2025-05-28T00:00:00Z" }, "2.10.4-22.04": { "stable": { - "target": "95" + "target": "102" }, "candidate": { - "target": "95" + "target": "102" }, "beta": { - "target": "95" + "target": "102" }, "edge": { - "target": "95" + "target": "102" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.10-22.04": { "stable": { - "target": "94" + "target": "101" }, "candidate": { - "target": "94" + "target": "101" }, "beta": { - "target": "94" + "target": "101" }, "edge": { - "target": "94" + "target": "101" }, "end-of-life": "2025-03-14T00:00:00Z" }, "2.10.0-22.04": { "stable": { - "target": "93" + "target": "100" }, "candidate": { - "target": "93" + "target": "100" }, "beta": { - "target": "93" + "target": "100" }, "edge": { - "target": "93" + "target": "100" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.11.0-22.04": { "stable": { - "target": "97" + "target": "104" }, "candidate": { - "target": "97" + "target": "104" }, "beta": { - "target": "97" + "target": "104" }, "edge": { - "target": "97" + "target": "104" }, "end-of-life": "2025-05-24T00:00:00Z" }, "2.11-22.04": { "stable": { - "target": "96" + "target": "103" }, "candidate": { - "target": "96" + "target": "103" }, "beta": { - "target": "96" + "target": "103" }, "edge": { - "target": "96" + "target": "103" }, "end-of-life": "2025-03-14T00:00:00Z" }, "2.12.0-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "98" + "target": "105" }, "candidate": { - "target": "98" + "target": "105" }, "beta": { - "target": "98" + "target": "105" }, "edge": { - "target": "98" + "target": "105" } }, "2.12-22.04": { "end-of-life": "2025-05-28T00:00:00Z", "stable": { - "target": "98" + "target": "105" }, "candidate": { - "target": "98" + "target": "105" }, "beta": { - "target": "98" + "target": "105" }, "edge": { - "target": "98" + "target": "105" } } } \ No newline at end of file From ef8cb36cd961dd2e5d8f80ca5aacb0141b5f08fd Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro Date: Fri, 20 Sep 2024 21:28:35 +0200 Subject: [PATCH 14/23] feat: add 24.04 to Renovate's radar (#248) --- .github/base_digests/24.04 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/base_digests/24.04 diff --git a/.github/base_digests/24.04 b/.github/base_digests/24.04 new file mode 100644 index 00000000..e9f9d674 --- /dev/null +++ b/.github/base_digests/24.04 @@ -0,0 +1,2 @@ +public.ecr.aws/ubuntu/ubuntu:noble@sha256:5b2fc4131b3c134a019c3ea815811de70e6ad9ee1626f59bf302558a95b436e5 + From c84b625e1ec01738957db57cb36971e991023d99 Mon Sep 17 00:00:00 2001 From: ROCKsBot Date: Fri, 20 Sep 2024 19:38:56 +0000 Subject: [PATCH 15/23] ci: automatically update oci/python/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10965174065 --- oci/python/_releases.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oci/python/_releases.json b/oci/python/_releases.json index 81a7a9f5..c53e77ff 100644 --- a/oci/python/_releases.json +++ b/oci/python/_releases.json @@ -17,16 +17,16 @@ "3.12-24.04": { "end-of-life": "2029-03-31T00:00:00Z", "edge": { - "target": "45" + "target": "48" }, "stable": { - "target": "45" + "target": "48" }, "candidate": { - "target": "45" + "target": "48" }, "beta": { - "target": "45" + "target": "48" } }, "3.10-22.04": { From 617ba6fa761bb2d8831876e95da37765bca85000 Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Mon, 23 Sep 2024 16:39:45 +0200 Subject: [PATCH 16/23] feat: move mock-rock to rocks-toolbox (#250) * feat: move mock-rock to rocks-toolbox * ci: automatically update oci/mock-rock/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10994528717 --------- Co-authored-by: zhijie-yang --- examples/mock-rock/1.0/rockcraft.yaml | 16 -------------- examples/mock-rock/1.1/rockcraft.yaml | 15 ------------- examples/mock-rock/1.2/rockcraft.yaml | 15 ------------- oci/mock-rock/_releases.json | 32 +++++++++++++-------------- oci/mock-rock/image.yaml | 18 +++++++-------- 5 files changed, 25 insertions(+), 71 deletions(-) delete mode 100644 examples/mock-rock/1.0/rockcraft.yaml delete mode 100644 examples/mock-rock/1.1/rockcraft.yaml delete mode 100644 examples/mock-rock/1.2/rockcraft.yaml diff --git a/examples/mock-rock/1.0/rockcraft.yaml b/examples/mock-rock/1.0/rockcraft.yaml deleted file mode 100644 index 08607349..00000000 --- a/examples/mock-rock/1.0/rockcraft.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: mock-rock -summary: Hello World -description: The most basic example of a rock. -version: "1.0" -base: bare -build-base: ubuntu@22.04 -license: Apache-2.0 -platforms: - amd64: - arm64: - -parts: - hello: - plugin: nil - stage-packages: - - hello \ No newline at end of file diff --git a/examples/mock-rock/1.1/rockcraft.yaml b/examples/mock-rock/1.1/rockcraft.yaml deleted file mode 100644 index 8ab6e150..00000000 --- a/examples/mock-rock/1.1/rockcraft.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: mock-rock -summary: Hello World -description: The most basic example of a rock. -version: "1.1" -base: bare -build-base: ubuntu@22.04 -license: Apache-2.0 -platforms: - amd64: - -parts: - hello: - plugin: nil - stage-packages: - - hello \ No newline at end of file diff --git a/examples/mock-rock/1.2/rockcraft.yaml b/examples/mock-rock/1.2/rockcraft.yaml deleted file mode 100644 index 525f133d..00000000 --- a/examples/mock-rock/1.2/rockcraft.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: mock-rock -summary: Hello World -description: The most basic example of a rock. -version: "1.2" -base: bare -build-base: ubuntu@22.04 -license: Apache-2.0 -platforms: - amd64: - -parts: - hello: - plugin: nil - stage-packages: - - hello \ No newline at end of file diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index 6d3a095b..1745775f 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -1,68 +1,68 @@ { "latest": { "candidate": { - "target": "553" + "target": "1.0-22.04_candidate" }, "beta": { - "target": "553" + "target": "latest_candidate" }, "edge": { - "target": "553" + "target": "latest_beta" }, "end-of-life": "2025-05-01T00:00:00Z" }, "1.0-22.04": { "candidate": { - "target": "553" + "target": "562" }, "beta": { - "target": "553" + "target": "562" }, "edge": { - "target": "553" + "target": "562" }, "end-of-life": "2025-05-01T00:00:00Z" }, "test": { "beta": { - "target": "553" + "target": "1.0-22.04_beta" }, "edge": { - "target": "553" + "target": "test_beta" }, "end-of-life": "2026-05-01T00:00:00Z" }, "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "554" + "target": "563" }, "beta": { - "target": "554" + "target": "563" }, "edge": { - "target": "554" + "target": "563" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "554" + "target": "563" }, "beta": { - "target": "554" + "target": "563" }, "edge": { - "target": "554" + "target": "563" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "555" + "target": "564" }, "edge": { - "target": "555" + "target": "1.2-22.04_beta" } } } \ No newline at end of file diff --git a/oci/mock-rock/image.yaml b/oci/mock-rock/image.yaml index bcdf1914..af89ca6e 100644 --- a/oci/mock-rock/image.yaml +++ b/oci/mock-rock/image.yaml @@ -9,9 +9,9 @@ release: beta: 1.0-22.04_beta upload: - - source: "canonical/oci-factory" - commit: 7f080b50ba656538aee3819889090c173f06debd - directory: examples/mock-rock/1.0 + - source: "canonical/rocks-toolbox" + commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f + directory: mock_rock/1.0 release: 1.0-22.04: end-of-life: "2025-05-01T00:00:00Z" @@ -19,9 +19,9 @@ upload: - candidate - edge - beta - - source: "canonical/oci-factory" - commit: 7f080b50ba656538aee3819889090c173f06debd - directory: examples/mock-rock/1.1 + - source: "canonical/rocks-toolbox" + commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f + directory: mock_rock/1.1 release: 1.1-22.04: end-of-life: "2025-05-01T00:00:00Z" @@ -35,9 +35,9 @@ upload: - candidate - edge - beta - - source: "canonical/oci-factory" - commit: 6829e479d71da94ffd46c18744e131a9693bc1b6 - directory: examples/mock-rock/1.2 + - source: "canonical/rocks-toolbox" + commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f + directory: mock_rock/1.2 release: 1.2-22.04: end-of-life: "2025-05-01T00:00:00Z" From 5631445d7e7958ba6cda669f8ef90a086613635e Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Mon, 23 Sep 2024 14:50:15 +0000 Subject: [PATCH 17/23] ci: automatically update oci/mock-rock/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/10996626344 --- oci/mock-rock/_releases.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index 1745775f..7ef217c1 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -13,13 +13,13 @@ }, "1.0-22.04": { "candidate": { - "target": "562" + "target": "565" }, "beta": { - "target": "562" + "target": "565" }, "edge": { - "target": "562" + "target": "565" }, "end-of-life": "2025-05-01T00:00:00Z" }, @@ -35,31 +35,31 @@ "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "563" + "target": "566" }, "beta": { - "target": "563" + "target": "566" }, "edge": { - "target": "563" + "target": "566" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "563" + "target": "566" }, "beta": { - "target": "563" + "target": "566" }, "edge": { - "target": "563" + "target": "566" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "564" + "target": "567" }, "edge": { "target": "1.2-22.04_beta" From 77149f17e36362e5180ac283614421b9e9cfc3e9 Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Tue, 24 Sep 2024 14:40:51 +0200 Subject: [PATCH 18/23] Fix CLI Client Handling Non-Interactive Terminal and Error Message for Non-Canonical Repo (#247) * fix: handle interactive terminal and non canonical repo * Update tools/cli-client/internals/cli/cli_main.go Co-authored-by: Linostar * feat: not enforce .git suffix and enfore match group length * feat: update regex to filter .git out from match item 1 * Update tools/cli-client/internals/trigger/build_metadata.go Co-authored-by: Cristovao Cordeiro * fix: use rocks-toolbox for mock-rock --------- Co-authored-by: Linostar Co-authored-by: Cristovao Cordeiro --- tools/cli-client/internals/cli/cli_main.go | 2 +- .../cli-client/internals/trigger/build_metadata.go | 14 +++++++++----- .../internals/trigger/build_metadata_test.go | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/tools/cli-client/internals/cli/cli_main.go b/tools/cli-client/internals/cli/cli_main.go index 5ebe3304..d6db002e 100644 --- a/tools/cli-client/internals/cli/cli_main.go +++ b/tools/cli-client/internals/cli/cli_main.go @@ -55,7 +55,7 @@ func addHelp(p *flags.Parser) { func blockForConfirm(s string) error { // check if is a tty fi, err := os.Stdin.Stat() - if err != nil || fi.Mode()&os.ModeNamedPipe == 0 { + if err != nil && fi.Mode()&os.ModeNamedPipe != 0 { return fmt.Errorf("non-interactive terminal detected, run with -y option") } else if err != nil { return err diff --git a/tools/cli-client/internals/trigger/build_metadata.go b/tools/cli-client/internals/trigger/build_metadata.go index 02044f20..50cec384 100644 --- a/tools/cli-client/internals/trigger/build_metadata.go +++ b/tools/cli-client/internals/trigger/build_metadata.go @@ -29,32 +29,36 @@ func InferBuildMetadata() BuildMetadata { repo, err := git.PlainOpenWithOptions(".", &git.PlainOpenOptions{DetectDotGit: true, EnableDotGitCommonDir: false}) if err != nil { - fmt.Fprintf(os.Stderr, "Unable to open repository: %v", err) + fmt.Fprintf(os.Stderr, "Unable to open repository: %v\n", err) os.Exit(1) } // find the source URL remotes, err := repo.Remotes() if err != nil { - fmt.Fprintf(os.Stderr, "Unable to obtain remotes: %v", err) + fmt.Fprintf(os.Stderr, "Unable to obtain remotes: %v\n", err) os.Exit(1) } if len(remotes) < 1 || len(remotes[0].Config().URLs) < 1 { - fmt.Fprintf(os.Stderr, "No valid remote exists for this repo") + fmt.Fprintf(os.Stderr, "No valid remote exists for this repo\n") os.Exit(1) } remoteURL := remotes[0].Config().URLs[0] logger.Debugf("Remote URL: %s", remoteURL) // use regex to match the repo location - regex := regexp.MustCompile("github.com[:/](canonical/.*).git") + regex := regexp.MustCompile(`github.com[:\/](canonical\/[A-Za-z0-9_-]*)(\.git)?`) matches := regex.FindStringSubmatch(remoteURL) + if len(matches) < 3 { + fmt.Fprintf(os.Stderr, "oci-factory must be called in a git local repository belonging to the organization [canonical]\n") + os.Exit(1) + } source := matches[1] logger.Debugf("Source: %s", source) headSha256, err := repo.ResolveRevision("HEAD") if err != nil { - fmt.Fprintf(os.Stderr, "Unable to resolve HEAD: %v", err) + fmt.Fprintf(os.Stderr, "Unable to resolve HEAD: %v\n", err) os.Exit(1) } logger.Debugf("HEAD SHA-256: %s", headSha256) diff --git a/tools/cli-client/internals/trigger/build_metadata_test.go b/tools/cli-client/internals/trigger/build_metadata_test.go index 427a9ec8..f228eb23 100644 --- a/tools/cli-client/internals/trigger/build_metadata_test.go +++ b/tools/cli-client/internals/trigger/build_metadata_test.go @@ -39,7 +39,7 @@ func (s *BuildMetadataSuite) TestGetBuildMetadataCustomDirector(c *C) { c.Fatal("git not installed") } repoPath := filepath.Join(s.dir, "tester-path") - cmd = exec.Command("git", "clone", "https://github.com/canonical/oci-factory.git", repoPath) + cmd = exec.Command("git", "clone", "https://github.com/canonical/rocks-toolbox.git", repoPath) var errBuf bytes.Buffer cmd.Stderr = &errBuf if err := cmd.Run(); err != nil { @@ -47,16 +47,16 @@ func (s *BuildMetadataSuite) TestGetBuildMetadataCustomDirector(c *C) { c.Fatal(err) } - err := os.Chdir(filepath.Join(repoPath, "examples", "mock-rock", "1.0")) + err := os.Chdir(filepath.Join(repoPath, "mock_rock", "1.0")) c.Assert(err, IsNil) result := trigger.InferBuildMetadata() - prefix := filepath.Join("examples", "mock-rock", "1.0") + "/" + prefix := filepath.Join("mock_rock", "1.0") + "/" head, err := exec.Command("git", "rev-parse", "HEAD").Output() headStr := strings.TrimSpace(string(head)) c.Assert(err, IsNil) - source := "canonical/oci-factory" + source := "canonical/rocks-toolbox" expected := trigger.BuildMetadata{ Source: source, Directory: prefix, From 9f89a7baa19c04aaacfe61c5747cee8439e9ca80 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:17:06 +0200 Subject: [PATCH 19/23] chore(deps): update dependency poethepoet to ^0.29.0 (#251) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Adrian Clay Lake --- tools/workflow-engine/charms/temporal-worker/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/workflow-engine/charms/temporal-worker/pyproject.toml b/tools/workflow-engine/charms/temporal-worker/pyproject.toml index c6d5d7f3..27abc052 100644 --- a/tools/workflow-engine/charms/temporal-worker/pyproject.toml +++ b/tools/workflow-engine/charms/temporal-worker/pyproject.toml @@ -28,7 +28,7 @@ importlib-resources = "^6.0.1" pytest = "^7.1.3" black = "^22.8.0" isort = "^5.10.1" -poethepoet = "^0.16.2" +poethepoet = "^0.29.0" pytest-asyncio = "^0.19.0" mypy = "^0.971" From 36e4c5e80db8741b83bba110f5366bc8fcff7e47 Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Fri, 27 Sep 2024 15:04:44 +0200 Subject: [PATCH 20/23] fix: do not close issue upon vulnerability scan errors (#254) --- .github/workflows/Vulnerability-Scan.yaml | 2 +- oci/mock-rock/_releases.json | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Vulnerability-Scan.yaml b/.github/workflows/Vulnerability-Scan.yaml index 1a055759..b4afee20 100644 --- a/.github/workflows/Vulnerability-Scan.yaml +++ b/.github/workflows/Vulnerability-Scan.yaml @@ -268,6 +268,6 @@ jobs: fi - name: Close issue - if: ${{ steps.issue-exists.outputs.issue-exists == 'true' && steps.create-markdown.outputs.vulnerability-exists == 'false' }} + if: ${{ needs.test-vulnerabilities.result == 'success' && steps.issue-exists.outputs.issue-exists == 'true' && steps.create-markdown.outputs.vulnerability-exists == 'false' }} run: | gh issue close ${{ steps.issue-exists.outputs.issue-number }} --repo ${{ steps.get-image-repo.outputs.img-repo }} diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index 7ef217c1..ec730c6a 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -13,13 +13,13 @@ }, "1.0-22.04": { "candidate": { - "target": "565" + "target": "574" }, "beta": { - "target": "565" + "target": "574" }, "edge": { - "target": "565" + "target": "574" }, "end-of-life": "2025-05-01T00:00:00Z" }, @@ -35,31 +35,31 @@ "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "566" + "target": "575" }, "beta": { - "target": "566" + "target": "575" }, "edge": { - "target": "566" + "target": "575" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "566" + "target": "575" }, "beta": { - "target": "566" + "target": "575" }, "edge": { - "target": "566" + "target": "575" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "567" + "target": "576" }, "edge": { "target": "1.2-22.04_beta" From 612d6968a3de232df82a70adc8e4fd0fd2a01843 Mon Sep 17 00:00:00 2001 From: zhijie-yang Date: Fri, 27 Sep 2024 15:41:18 +0200 Subject: [PATCH 21/23] Bypass actor validation for Image, Build, Test, Vul-Scan workflow triggered by forked PRs (#253) --------- Co-authored-by: Adrian Clay Lake Co-authored-by: Cristovao Cordeiro --- .github/workflows/Build-Rock.yaml | 6 ++++-- .github/workflows/Image.yaml | 2 +- .github/workflows/Tests.yaml | 2 +- .github/workflows/Vulnerability-Scan.yaml | 2 +- oci/mock-rock/_releases.json | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/Build-Rock.yaml b/.github/workflows/Build-Rock.yaml index bec32ec5..eda9e812 100644 --- a/.github/workflows/Build-Rock.yaml +++ b/.github/workflows/Build-Rock.yaml @@ -40,17 +40,19 @@ jobs: steps: # Checkout the OCI Factory repo for the actor validation - uses: actions/checkout@v4 - if: ${{ github.repository == 'canonical/oci-factory' }} + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} - name: Validate access to triggered image uses: ./.github/actions/validate-actor - if: ${{ github.repository == 'canonical/oci-factory' }} + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} with: admin-only: true image-path: ${{ inputs.oci-factory-path }} github-token: ${{ secrets.ROCKSBOT_TOKEN }} + # We clear the working directory to make space for the rock repo - run: rm -rf ./* + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} - name: Clone GitHub image repository uses: actions/checkout@v4 diff --git a/.github/workflows/Image.yaml b/.github/workflows/Image.yaml index d0853551..ccec363b 100644 --- a/.github/workflows/Image.yaml +++ b/.github/workflows/Image.yaml @@ -96,7 +96,7 @@ jobs: - name: Validate access to triggered image uses: ./.github/actions/validate-actor - if: ${{ github.repository == 'canonical/oci-factory' }} + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} with: admin-only: true image-path: ${{ steps.validate-image.outputs.img-path }} diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index 7d02297e..15c205bd 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -72,7 +72,7 @@ jobs: - uses: actions/checkout@v4 - name: Validate access to triggered image uses: ./.github/actions/validate-actor - if: ${{ github.repository == 'canonical/oci-factory' }} + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} with: admin-only: true image-path: ${{ inputs.oci-image-path }} diff --git a/.github/workflows/Vulnerability-Scan.yaml b/.github/workflows/Vulnerability-Scan.yaml index b4afee20..e475ea29 100644 --- a/.github/workflows/Vulnerability-Scan.yaml +++ b/.github/workflows/Vulnerability-Scan.yaml @@ -46,7 +46,7 @@ jobs: - name: Validate access to triggered image uses: ./.github/actions/validate-actor - if: ${{ github.repository == 'canonical/oci-factory' }} + if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }} with: admin-only: true image-path: ${{ inputs.oci-image-path }} diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index ec730c6a..db20c7a8 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -13,13 +13,13 @@ }, "1.0-22.04": { "candidate": { - "target": "574" + "target": "577" }, "beta": { - "target": "574" + "target": "577" }, "edge": { - "target": "574" + "target": "577" }, "end-of-life": "2025-05-01T00:00:00Z" }, @@ -35,31 +35,31 @@ "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "575" + "target": "578" }, "beta": { - "target": "575" + "target": "578" }, "edge": { - "target": "575" + "target": "578" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "575" + "target": "578" }, "beta": { - "target": "575" + "target": "578" }, "edge": { - "target": "575" + "target": "578" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "576" + "target": "579" }, "edge": { "target": "1.2-22.04_beta" From 5cbfc0134df61a4072d5ac9a2b0549d010758174 Mon Sep 17 00:00:00 2001 From: cjdcordeiro Date: Fri, 27 Sep 2024 13:52:23 +0000 Subject: [PATCH 22/23] ci: automatically update oci/mock-rock/_releases.json, from https://github.com/canonical/oci-factory/actions/runs/11071765556 --- oci/mock-rock/_releases.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/oci/mock-rock/_releases.json b/oci/mock-rock/_releases.json index db20c7a8..679461d1 100644 --- a/oci/mock-rock/_releases.json +++ b/oci/mock-rock/_releases.json @@ -13,13 +13,13 @@ }, "1.0-22.04": { "candidate": { - "target": "577" + "target": "583" }, "beta": { - "target": "577" + "target": "583" }, "edge": { - "target": "577" + "target": "583" }, "end-of-life": "2025-05-01T00:00:00Z" }, @@ -35,31 +35,31 @@ "1.1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "578" + "target": "584" }, "beta": { - "target": "578" + "target": "584" }, "edge": { - "target": "578" + "target": "584" } }, "1-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "candidate": { - "target": "578" + "target": "584" }, "beta": { - "target": "578" + "target": "584" }, "edge": { - "target": "578" + "target": "584" } }, "1.2-22.04": { "end-of-life": "2025-05-01T00:00:00Z", "beta": { - "target": "579" + "target": "585" }, "edge": { "target": "1.2-22.04_beta" From 32410b0206bf3d739a2938c885c4a81a912c37fb Mon Sep 17 00:00:00 2001 From: Linostar Date: Mon, 30 Sep 2024 14:39:06 +0300 Subject: [PATCH 23/23] Do not build/release/test/scan tracks with expired end-of-life values (#241) --- oci/mock-rock/image.yaml | 2 +- .../prepare_single_image_build_matrix.py | 23 +++++++++++++++---- src/image/utils/schema/triggers.py | 18 ++------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/oci/mock-rock/image.yaml b/oci/mock-rock/image.yaml index af89ca6e..75e22f84 100644 --- a/oci/mock-rock/image.yaml +++ b/oci/mock-rock/image.yaml @@ -14,7 +14,7 @@ upload: directory: mock_rock/1.0 release: 1.0-22.04: - end-of-life: "2025-05-01T00:00:00Z" + end-of-life: "2024-05-01T00:00:00Z" risks: - candidate - edge diff --git a/src/image/prepare_single_image_build_matrix.py b/src/image/prepare_single_image_build_matrix.py index b2657354..f94dfa6a 100755 --- a/src/image/prepare_single_image_build_matrix.py +++ b/src/image/prepare_single_image_build_matrix.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import argparse +from datetime import datetime, timezone import glob import json import os @@ -59,8 +60,10 @@ def validate_image_trigger(data: dict) -> None: builds = image_trigger.get("upload", []) release_to = "true" if "release" in image_trigger else "" + + img_number = 0 # inject some extra metadata into the matrix data - for img_number, _ in enumerate(builds): + while img_number < len(builds): builds[img_number]["name"] = args.oci_path.rstrip("/").split("/")[-1] builds[img_number]["path"] = args.oci_path builds[img_number]["revision"] = img_number + int(args.next_revision) @@ -103,13 +106,23 @@ def validate_image_trigger(data: dict) -> None: # set an output as a marker for later knowing if we need to release if "release" in builds[img_number]: - release_to = "true" - # the workflow GH matrix has a problem parsing nested JSON dicts - # so let's remove this field since we don't need it for the builds - builds[img_number]["release"] = "true" + min_eol = datetime.strptime(min( + v["end-of-life"] for v in builds[img_number]["release"].values() + ), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc) + if min_eol < datetime.now(timezone.utc): + print("Track skipped because it reached its end of life") + del builds[img_number] + continue + else: + release_to = "true" + # the workflow GH matrix has a problem parsing nested JSON dicts + # so let's remove this field since we don't need it for the builds + builds[img_number]["release"] = "true" else: builds[img_number]["release"] = "" + img_number += 1 + matrix = {"include": builds} print(f"{args.oci_path} - build matrix:\n{json.dumps(matrix, indent=4)}") with open(os.environ["GITHUB_OUTPUT"], "a") as gh_out: diff --git a/src/image/utils/schema/triggers.py b/src/image/utils/schema/triggers.py index 49e928ae..74fcf487 100644 --- a/src/image/utils/schema/triggers.py +++ b/src/image/utils/schema/triggers.py @@ -1,6 +1,6 @@ import pydantic -from datetime import datetime, timezone +from datetime import datetime from typing import Dict, List, Literal, Optional @@ -25,13 +25,6 @@ class ImageUploadReleaseSchema(pydantic.BaseModel): class Config: extra = pydantic.Extra.forbid - @pydantic.validator("end_of_life") - def ensure_still_supported(cls, v: datetime) -> datetime: - """ensure that the end of life isn't reached.""" - if v < datetime.now(timezone.utc): - raise ImageReachedEol("This track has reached its end of life") - return v - class ImageUploadSchema(pydantic.BaseModel): """Schema of each upload within the image.yaml files.""" @@ -58,7 +51,7 @@ class Config: extra = pydantic.Extra.forbid @pydantic.validator("stable", "candidate", "beta", "edge", pre=True) - def _check_risks(cls, values: List) -> str: + def _check_risks(cls, values: List) -> List: """There must be at least one risk specified.""" error = "At least one risk must be specified per track." if not any(values): @@ -66,13 +59,6 @@ def _check_risks(cls, values: List) -> str: return values - @pydantic.validator("end_of_life") - def ensure_still_supported(cls, v: datetime) -> datetime: - """ensure that the end of life isn't reached.""" - if v < datetime.now(timezone.utc): - raise ImageReachedEol("This track has reached its end of life") - return v - class ImageSchema(pydantic.BaseModel): """Validates the schema of the image.yaml files."""