Ci extract lxd platforms specifics to lxd scheduled job - #7047
Ci extract lxd platforms specifics to lxd scheduled job#7047blackboxsw wants to merge 6 commits into
Conversation
Create oci workflow integration test coverage for Oracle on Ubuntu Jammy, Noble, Resolute and Stonking scheduled twice-weekly: - Mon & Thu, cron '2 22 * * 1,4 Extend the shared 100-dispatch-common.yml workflow: - add 'oci' to the workflow_dispatch platform choice list - add two optional secrets PYCLOUDLIB_OCI_CONFIG_B64 / PYCLOUDLIB_OCI_KEY_B64 to workflow_call.secrets - pass PYCLOUDLIB_OCI_CONFIG_FILE_PATH / PYCLOUDLIB_OCI_KEY_FILE_PATH to the Run integration Tests step env - clean up the oci dir in the Clean pycloudlib step
Replace the reusable workflow .github/workflows/100-dispatch-common.yml with a composite action .github/actions/integration-test that contains the shared integration-test steps (secret assertion, checkout, LXD/SSH/ pycloudlib setup, tox run, report publish, cleanup). OCI-specific secret validation and credential setup are pulled out of the common path and moved into steps within each 15*oci.yml scheduled workflow, which write the OCI config/key to $RUNNER_TEMP/oci before invoking the composite action. All 16 scheduled integration workflows (4 OCI, 4 EC2, 8 LXD) now call the composite action directly with job-level env secret mappings, matching the repo's existing composite-action convention (.github/actions/create-sru-bug). Behavior is preserved; the canonical/cloud-init repository guard moves from the reusable workflow job onto each calling job.
The 15*oci.yml workflows run OCI-specific steps before invoking the local composite action ./.github/actions/integration-test. GitHub requires action.yml to exist on the runner to load a local action, so actions/checkout must run first. Add a Checkout step at the top of each OCI workflow's job, ahead of the OCI secret assertion and credential setup steps.
The runner context is not available inside a composite action's runs
section at manifest-load time, so ${{ runner.temp }} expressions in
.github/actions/integration-test/action.yml caused workflow dispatch to
fail with "Unrecognized named-value: 'runner'". Add a required
runner_temp input to the composite action and replace its internal
${{ runner.temp }} references with ${{ inputs.runner_temp }}. All 16
caller workflows now pass runner_temp: ${{ runner.temp }} (the runner
context is available in workflow jobs).
The shared integration-test composite action is consumed by LXD, EC2, Azure, and OCI workflows. Move the LXD snap setup out of the composite action (where it was conditionally skipped for non-LXD platforms) and into the eight lxd_container / lxd_vm daily scheduled workflows, which are inherently LXD-specific and no longer need the platform conditional.
759afc0 to
71ceaf9
Compare
| @@ -0,0 +1,137 @@ | |||
| name: Run cloud-init integration tests | |||
There was a problem hiding this comment.
What is the relationship between this file and the dispatch-common file? It looks like the dispatch-common is now only used by Azure - is that expected?
| echo "ERROR: Missing required repo secret. Please provide SSH_PRIVATE_KEY repo secret at ${{ github.repository }}/settings/secrets/actions." | ||
| exit 1 | ||
| fi | ||
| if [ "$CLOUD_INIT_PLATFORM" = "oci" ]; then |
There was a problem hiding this comment.
It doesn't look like the OCI job uses this file.
There was a problem hiding this comment.
It was an oversight on #6969. I've dropped that appropriately on that PR. will set this draft until the OCI integration test pr lands.
| @@ -0,0 +1,65 @@ | |||
| name: "Twice weekly 22.04: oci" | |||
There was a problem hiding this comment.
Can we please reduce scope? Adding both OCI jobs and an action makes this more to review at once.
There was a problem hiding this comment.
In this PR I was attempting to queue a dependency where the review requirement was just the topmost commeit after 6969 lands. I've set it to draft to avoid you having to ignore the rest of the delta for the preliminary branch in this sequence.
Blocked by #6969. move workflow LXD-specific into lxd scheduled jobs.
Proposed Commit Message
Additional Context
only topmost commit is reviewable for this PR.
Awaiting closure on #6969 before merging this branch.
Test Steps
validation run on separate remote
Merge type