Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: refactor on push and release workflows to use same cached build used in tests #657

Open
wants to merge 6 commits into
base: KF-6684-refactor-ci-with-build
Choose a base branch
from

Conversation

NohaIhab
Copy link
Contributor

@NohaIhab NohaIhab commented Jan 21, 2025

Based on #655
Closes #650
Closes #656

Summary

This PR refactors the repo's CI to use the same cached builds for individual integration tests, release charm, and promote workflows.

The workflows are refactored to follow the same structure and conventions as in data platform teams. It includes the following changes:

  • Refactors the integrate.yaml and renames it to ci.yaml
  • Creates release.yaml which reused data platform workflows' release_charm.yaml
  • Removes the separate on_pull_request.yaml and on_push.yaml workflows, instead they reuse the ci.yaml for tests and release.yaml for releasing to charmhub
  • Renames the old release.yaml to promote.yaml

DnPlas and others added 6 commits January 17, 2025 12:15
* ci, tests: pass charm artefacts to deploy and test charms

This commit enables the "--charm-path" option to pass .charm artefacts
to be deployed and tested at an individual level.
This change enables the option to pass pre-built charms to the tests
to avoid building them on the same test. It also ensures compatibility
with the build_charm.py reusable workflow (from canonical/data-platform-workflows).

Fixes: #639
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed from release.yaml for consistency with data repos

Comment on lines +10 to +14
destination_channel:
description: CharmHub channel to publish to
required: false
default: 'latest/edge'
type: string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transferred comment from #655 (comment)

is this input ever used? I would imagine you would just dispatch the workflow on the correct branch and then the charming-actions/channel would get the channel right?

@carlcsaposs-canonical we do use this input in workflow dispatch, for example during our beta release we use it to release charms from latest/edge to <version>/beta

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't promote.yaml be used for beta releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's true, I think in this case there's no use for workflow_dispatch for this workflow. WDYT?

Comment on lines +24 to +25
# TODO: use canonical/charming-actions/promote-charm?
uses: canonical/charming-actions/[email protected]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transferred comment from https://github.com/canonical/kfp-operators/pull/655/files#r1920090360

promote-charm looks like a new action that might work better here? not sure

From the README.md it looks like it's similar to release-charm except that it cover multi-base charms. Our team does not support that. I will confirm if that's the only difference.

@NohaIhab NohaIhab marked this pull request as ready for review January 22, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants