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

feat: backport rock upload to charmcraft 2.x #1708

Merged
merged 10 commits into from
Jun 13, 2024

Conversation

lengau
Copy link
Collaborator

@lengau lengau commented Jun 13, 2024

Allows Charmcraft 2.7+ to use skopeo urls directly when uploading an oci-image resource.

Example:

$ charmcraft upload-resource lengau-test-charm example-image --image docker://ghcr.io/canonical/charmed-mysql:8.0.36-22.04_edge
Image not found locally. Passing path directly to skopeo.                                         
Revision 6 created of resource 'example-image' for charm 'lengau-test-charm'.      
$

Copies the Skopeo class from:
#1696
@lengau lengau force-pushed the work/CRAFT-2921-backport branch from f48c94d to 74967ea Compare June 13, 2024 18:54
@lengau lengau force-pushed the work/CRAFT-2921-backport branch from 74967ea to 80f9228 Compare June 13, 2024 18:57
@lengau lengau requested review from tigarmo and mr-cal June 13, 2024 18:59
@lengau lengau force-pushed the work/CRAFT-2921-backport branch from 3314f18 to 54ed103 Compare June 13, 2024 19:10
@lengau lengau merged commit 7b86722 into hotfix/2.7 Jun 13, 2024
19 checks passed
@lengau lengau deleted the work/CRAFT-2921-backport branch June 13, 2024 21:42
carlcsaposs-canonical added a commit to canonical/data-platform-workflows that referenced this pull request Jun 19, 2024
charmcraft 2.7.0 contains a fix for multi-arch OCI images
issue: canonical/charmcraft#1685
fix: canonical/charmcraft#1708

However, it fixes it in a "backwards-compatible" way—if the image is available locally, it will still upload it incorrectly.

Stop downloading the image locally & always use GHCR so that charmcraft uploads the image correctly

This will break on charmcraft < 2.7.0
carlcsaposs-canonical added a commit to canonical/data-platform-workflows that referenced this pull request Jun 19, 2024
…#198)

charmcraft 2.7.0 contains a fix for multi-arch OCI images issue:
canonical/charmcraft#1685 fix:
canonical/charmcraft#1708

However, it fixes it in a "backwards-compatible" way—if the image is
available locally, it will still upload it incorrectly.

Stop downloading the image locally & always use GHCR so that charmcraft
uploads the image correctly

This will break on charmcraft < 2.7.0
lengau added a commit that referenced this pull request Jul 19, 2024
Allows Charmcraft 2.7+ to use skopeo urls directly when uploading an
oci-image resource.

Example:

```
$ charmcraft upload-resource lengau-test-charm example-image --image docker://ghcr.io/canonical/charmed-mysql:8.0.36-22.04_edge
Image not found locally. Passing path directly to skopeo.
Revision 6 created of resource 'example-image' for charm 'lengau-test-charm'.
$
```
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.

3 participants