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

Specify only a tag for image to use #1169

Closed
1 of 2 tasks
Emilgardis opened this issue Dec 6, 2022 · 2 comments · Fixed by #1491
Closed
1 of 2 tasks

Specify only a tag for image to use #1169

Emilgardis opened this issue Dec 6, 2022 · 2 comments · Fixed by #1491

Comments

@Emilgardis
Copy link
Member

Checklist

Describe your request

Is it possible in the Cross.toml to supply just the tag of the image and not the whole image? Might be a bit less error-prone as it will just take the github image associated with the target, but with a specific tag.

Originally posted by @blu3beri in #1167 (comment)

Describe why this would be a good inclusion for cross

This would make it easier to switch between versions.

for example one could do

# always use the image for the target with the tag `main`
image = ":main"
# always use the image for the target with the sha `DEADBEEF`
image = "@sha256:DEADBEEF"

optionally, we could also use this to switch to what we call a "subtarget", but not sure what the syntax would look for that.

@Emilgardis
Copy link
Member Author

Emilgardis commented Dec 6, 2022

This is actually how I wanted the image feature to work.

There is one concern with this, see previous discussion in #44 (comment)

the problem is that technically we don't guarantee that a semver breaking change (and semver being the cargo definition, change in first non-zero version number = breaking) is compatible

@Emilgardis
Copy link
Member Author

I'm going to include this for 0.3.0, all 0.2.5 images are compatible with 0.3.0, so I think this is ok.

@Emilgardis Emilgardis added this to the v0.3.0 milestone Feb 2, 2024
github-merge-queue bot pushed a commit that referenced this issue May 14, 2024
Closes #1169.

Also supports specifying only a hash (`@sha256:...`) or subtarget
(`-centos`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant