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

Fix CI #46

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Fix CI #46

merged 1 commit into from
Oct 19, 2023

Conversation

barrettj12
Copy link
Contributor

@barrettj12 barrettj12 commented Oct 18, 2023

Fix CI:

  • Upload the charm to a temporary branch for testing - then cross-release this to edge on push.
  • Add a separate CI job to select the Charmhub channels.
  • Upload the charm in a separate job, outside of the integration tests.
  • Rename the bootstrap job to integration.

Disable CI runs on pull_request:

  • This fundamentally doesn't work as the CI workflow needs to access secrets to upload the charm to Charmhub - and GitHub doesn't allow pull_request runs to access secrets.
  • For this reason, contributors should always open PRs from a branch on the main repo. Add a pr.yml workflow which checks this. (EDIT: I deleted this workflow cause it really does not seem to work at all. Something weird about the way GitHub triggers actions).

Enable CI on forks:

  • Introduce a CHARM_NAME variable, which can be set on a fork to upload the charm to a different URL.
  • Allow overriding the charm name in the charmcraft_tokengen.sh script, to allow contributors to easily generate the CHARMCRAFT_AUTH secret for their forks
    CHARM_NAME=barrettj12-cc .github/charmcraft-tokengen.sh
    

QA steps

  • GitHub Actions should pass on this PR.
  • GitHub Actions should pass when run on a fork (here).
  • The new PR workflow should fail when run on a PR opened from a fork. See Test PR workflow #47
  • Automatic edge releases work:
    $ juju info barrettj12-cc
    latest/edge:       65  2023-10-18  (65)  10MB

Links

Jira card: JUJU-4663

@barrettj12 barrettj12 mentioned this pull request Oct 18, 2023
- upload charm to temporary branch for testing
- cross-release to edge on push
- Add separate CI job to select Charmhub channels
- Upload the charm in a separate job, outside of the integration tests.
- Rename the `bootstrap` job to `integration`.
- Disable CI runs on `pull_request`
- Introduce a `CHARM_NAME` variable, which can be set on a fork to upload the charm to a different URL.
- Allow overriding the charm name in the `charmcraft_tokengen.sh` script
@barrettj12 barrettj12 merged commit aa4b959 into 3.1 Oct 19, 2023
9 checks passed
@barrettj12 barrettj12 deleted the fix-ci branch October 19, 2023 01:55
This was referenced Oct 19, 2023
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.

2 participants