Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/canonical/oci-factory into …
Browse files Browse the repository at this point in the history
…ROCKS-1452/oci-factory-refactor-build-rock-to-be-externally-reusable
  • Loading branch information
clay-lake committed Oct 8, 2024
2 parents 4cbf7c2 + 32410b0 commit 151ddcd
Show file tree
Hide file tree
Showing 22 changed files with 203 additions and 222 deletions.
2 changes: 1 addition & 1 deletion .github/base_digests/20.04
Original file line number Diff line number Diff line change
@@ -1 +1 @@
public.ecr.aws/ubuntu/ubuntu:focal@sha256:f80053be8041fea27b329b31c96e8177cd3922ef748a246dc55f651fefdee537
public.ecr.aws/ubuntu/ubuntu:focal@sha256:036c51fb190af9d3ec7fbd654c2669d5a3da3549aa0e3408b40ba6fb6eb16dfc
2 changes: 1 addition & 1 deletion .github/base_digests/22.04
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
public.ecr.aws/ubuntu/ubuntu:jammy@sha256:606a9e0ca22a44f8956dcb463ab4daba5d50c100ea8075d3c24a2bddd161d320
public.ecr.aws/ubuntu/ubuntu:jammy@sha256:1582c29f34a48752e406f1a261fe9545fad895da3f6bb4be55bc82485557564e

2 changes: 2 additions & 0 deletions .github/base_digests/24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public.ecr.aws/ubuntu/ubuntu:noble@sha256:5b2fc4131b3c134a019c3ea815811de70e6ad9ee1626f59bf302558a95b436e5

34 changes: 28 additions & 6 deletions .github/workflows/Build-Rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,43 @@ jobs:
runner-build-matrix: ${{ steps.configure.outputs.runner-build-matrix }}
lpci-build-matrix: ${{ steps.configure.outputs.lpci-build-matrix }}
steps:
# Job Setup
# Checkout the OCI Factory repo for the actor validation
- uses: actions/checkout@v4
with:
repository: ${{ env.OCI_FACTORY_REPO }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1
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
id: clone-image-repo
continue-on-error: true
with:
repository: ${{ env.OCI_FACTORY_REPO }}
ref: ${{ env.OCI_FACTORY_BRANCH }}
fetch-depth: 1

- run: git checkout ${{ inputs.rock-repo-commit }}

- run: sudo snap install yq --channel=v4/stable
- name: Validate image naming and base
working-directory: ${{ inputs.rockfile-directory }}
run: |
rock_name=`cat rockcraft.y*ml | yq -r .name`
if [[ "${{ inputs.oci-factory-path }}" != *"${rock_name}"* ]]
then
echo "ERROR: the rock's name '${rock_name}' must match the OCI folder name!"
exit 1
fi
- uses: actions/setup-python@v5
with:
python-version: "3.x"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Vulnerability-Scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
16 changes: 0 additions & 16 deletions examples/mock-rock/1.0/rockcraft.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions examples/mock-rock/1.1/rockcraft.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions examples/mock-rock/1.2/rockcraft.yaml

This file was deleted.

56 changes: 28 additions & 28 deletions oci/alertmanager/_releases.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
{
"0.25.0-22.04": {
"stable": {
"target": "53"
"target": "59"
},
"candidate": {
"target": "53"
"target": "59"
},
"beta": {
"target": "53"
"target": "59"
},
"edge": {
"target": "53"
"target": "59"
},
"end-of-life": "2025-03-13T00:00:00Z"
},
"0.25-22.04": {
"stable": {
"target": "53"
"target": "59"
},
"candidate": {
"target": "53"
"target": "59"
},
"beta": {
"target": "53"
"target": "59"
},
"edge": {
"target": "53"
"target": "59"
},
"end-of-life": "2025-03-13T00:00:00Z"
},
"0-22.04": {
"stable": {
"target": "55"
"target": "61"
},
"candidate": {
"target": "55"
"target": "61"
},
"beta": {
"target": "55"
"target": "61"
},
"edge": {
"target": "55"
"target": "61"
},
"end-of-life": "2025-03-13T00:00:00Z"
},
"0.26.0-22.04": {
"stable": {
"target": "54"
"target": "60"
},
"candidate": {
"target": "54"
"target": "60"
},
"beta": {
"target": "54"
"target": "60"
},
"edge": {
"target": "54"
"target": "60"
},
"end-of-life": "2025-03-13T00:00:00Z"
},
"0.26-22.04": {
"stable": {
"target": "54"
"target": "60"
},
"candidate": {
"target": "54"
"target": "60"
},
"beta": {
"target": "54"
"target": "60"
},
"edge": {
"target": "54"
"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": "55"
"target": "61"
},
"candidate": {
"target": "55"
"target": "61"
},
"beta": {
"target": "55"
"target": "61"
},
"edge": {
"target": "55"
"target": "61"
}
},
"0.27-22.04": {
"end-of-life": "2025-03-13T00:00:00Z",
"stable": {
"target": "55"
"target": "61"
},
"candidate": {
"target": "55"
"target": "61"
},
"beta": {
"target": "55"
"target": "61"
},
"edge": {
"target": "55"
"target": "61"
}
}
}
Loading

0 comments on commit 151ddcd

Please sign in to comment.