canonical / operator-workflows

Apache License 2.0
7 stars 9 forks source link

feat: multiarch promote #378

Closed yanksyoon closed 3 months ago

yanksyoon commented 3 months ago

Applicable spec: NA

Overview

Rationale

Workflow Changes

Checklist

The test cannot be done E2E because of the inputs. Hence, the script has been copied over and modified to be called with input arguments (rather than from github inputs.xxx). Modified script, try it out yourself! The test has been run against the following repository's charmcraft yaml

yanks@nuc:~/canonical/github-runner-operator$ ./test.sh arm64 22.04 ubuntu yanks@nuc:~/canonical/github-runner-operator$ echo $? 0

yanks@nuc:~/canonical/github-runner-operator$ ./test.sh amd64 24.04 ubuntu No matching base found: amd64 24.04 ubuntu

yanks@nuc:~/canonical/github-runner-operator$ ./test.sh amd32 22.04 ubuntu No matching base found: amd32 22.04 ubuntu



Backwards compatibility tests:
- Defined input `base-architecture`, `base-channel`, `base-name` to non existing values in charmcraft.yaml: https://github.com/canonical/jenkins-k8s-operator/actions/runs/10104355603/job/27943205874, fails as expected ✅ 
- Defined input `base-architecture`, `base-channel`, `base-name` to existing values in charmcraft.yaml: https://github.com/canonical/jenkins-k8s-operator/actions/runs/10104362266/job/27943222849, passes as expected ✅ 
- Undefined input `base-architecture`, `base-channel`, `base-name` to test backwards compatibility: https://github.com/canonical/jenkins-k8s-operator/actions/runs/10104383773/job/27943278395, passes as expected ✅ , chooses the first match by default.