Skip to content

Adapt CI to canonical/charm-ci#531

Draft
javierdelapuente wants to merge 12 commits into
canonical:mainfrom
javierdelapuente:adapt-to-charm-ci
Draft

Adapt CI to canonical/charm-ci#531
javierdelapuente wants to merge 12 commits into
canonical:mainfrom
javierdelapuente:adapt-to-charm-ci

Conversation

@javierdelapuente
Copy link
Copy Markdown
Contributor

  • Add artifacts.yaml generated by opcli artifacts init
  • Replace spread.yaml with opcli-generated version using the integration-test virtual backend and integration-suites for all four sub-charm test directories
  • Add concierge.yaml for LXD-based Juju test environment provisioning
  • Replace integration_test.yaml workflow with canonical/charm-ci reusable workflow (build-artifacts + integration-test)

The previous workflow called canonical/operator-workflows; the new one delegates to canonical/charm-ci which uses opcli + spread to discover, build, and test artifacts declared in artifacts.yaml / spread.yaml.

What this PR does

Why we need it

Checklist

  • I followed the contributing guide
  • I added or updated the documentation (if applicable)
  • I updated docs/changelog.md with user-relevant changes
  • I added a change artifact for user-relevant changes in docs/release-notes/artifacts. If no change artifact is necessary, I tagged the PR with the label no-release-note.
  • I used AI to assist with preparing this PR
  • I added or updated tests as needed (unit and integration)
  • If integration test modules are used: I updated the workflow configuration
    (e.g., in .github/workflows/integration_tests.yaml, ensure the modules list is correct)
  • If this PR involves a Grafana dashboard: I added a screenshot of the dashboard
  • If this PR involves Terraform: terraform fmt passes and tflint reports no errors

javierdelapuente and others added 2 commits June 2, 2026 13:16
- Add artifacts.yaml generated by `opcli artifacts init`
- Replace spread.yaml with opcli-generated version using the
  integration-test virtual backend and integration-suites for all
  four sub-charm test directories
- Add concierge.yaml for LXD-based Juju test environment provisioning
- Replace integration_test.yaml workflow with canonical/charm-ci
  reusable workflow (build-artifacts + integration-test)

The previous workflow called canonical/operator-workflows; the new one
delegates to canonical/charm-ci which uses opcli + spread to discover,
build, and test artifacts declared in artifacts.yaml / spread.yaml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace invalid 'cwd' key with 'working-dir' in all per-charm suites
- Set working-dir to each charm's sub-directory so pytest runs from the
  correct root (relative paths in conftest.py resolve correctly)
- Add tests/integration/ suite for cross-charm tests requiring canonical-k8s
- Create concierge-ck8s.yaml with LXD + canonical-k8s 1.32-classic/stable
  (k8s not bootstrapped as juju controller; conftest handles that itself)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
javierdelapuente and others added 10 commits June 2, 2026 14:22
opcli passes --charm-file for all built charms; change action to
'append' and filter by charm name to avoid deploying the wrong charm.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s suite

opcli passes all charm files by default; use pytest-arguments-template to
restrict --charm-file to only haproxy-ddos-protection-configurator.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…emplate

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
build.path is relative to the project root (e.g. './built-charm-.../charm.charm')
but pytest runs from haproxy-ddos-protection-configurator/ due to working-dir,
so replace './' with '../' to make the path resolve correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Each suite now passes only its own charm file, avoiding cross-charm
contamination and fixing the relative path issue introduced by working-dir.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tests

Legacy tests under haproxy-operator/tests/integration/legacy/ use
pytest-operator which unconditionally checks for charmcraft at startup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ion suite

Replaces the operator-workflows pre-run-script. Runs as root (spread default)
but delegates juju to the ubuntu user where concierge bootstrapped the controller.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Concierge was bootstrapping concierge-lxd while conftest bootstraps localhost,
resulting in two controllers. Set bootstrap: false so concierge only installs
LXD+Juju and the conftest manages its own localhost controller.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant