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

Export images with different tags than their source #79

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

n-thumann
Copy link
Member

@n-thumann n-thumann commented Jan 7, 2025

What

This PR adds the possibility to explicitly specify a tag for the exported image. If not specified, it'll keep using the tag of the source image.

Why

For #77 we need to use the image tumbleweed:latest, but want to export is as opensuse:tumbleweed instead. This is not possible with the current behavior.

References

Checklist

I tested this using two Ubuntu images in https://github.com/greenbone/vt-test-environments/actions/runs/12647975873?pr=79.
Without any EXPORT_TAG the image us built using

Run redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056
  with:
    context: operating_systems/ubuntu
    containerfiles: operating_systems/ubuntu/Dockerfile
    tags: ghcr.io/greenbone/vt-test-environments/ubuntu:24.04
    build-args: TAG=24.04
[...]
✅ Successfully built image "ghcr.io/greenbone/vt-test-environments/ubuntu:24.04"

With it it's built using

Run redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056
  with:
    context: operating_systems/ubuntu
    containerfiles: operating_systems/ubuntu/Dockerfile
    tags: ghcr.io/greenbone/vt-test-environments/ubuntu:foo
    build-args: TAG=24.10
[...]
✅ Successfully built image "ghcr.io/greenbone/vt-test-environments/ubuntu:foo"

@n-thumann n-thumann force-pushed the export_different_tag branch 2 times, most recently from 403604f to 9f545d1 Compare January 7, 2025 08:40
@n-thumann n-thumann marked this pull request as ready for review January 7, 2025 08:40
@n-thumann n-thumann requested review from a team as code owners January 7, 2025 08:40
@n-thumann n-thumann enabled auto-merge (squash) January 7, 2025 08:41
@n-thumann n-thumann merged commit a40d35a into main Jan 7, 2025
109 of 113 checks passed
@n-thumann n-thumann deleted the export_different_tag branch January 7, 2025 08:43
sudiptagreenbone added a commit that referenced this pull request Jan 7, 2025
sudiptagreenbone added a commit that referenced this pull request Jan 7, 2025
#77)

* Changes: Added support for openSUSE tumbleweed and leap v15.6,v15.5,v15.4,v15.3

* Changes: Updated aligned with review comments. Removed base image for opensuse leap as it is the default for the docker file. Changed the openSUSE version tag format on the README. Removed shadow installation and addition of password authentication to the sshd config file.

* Changes: Updated the export tag for Tumbleweed to tumbleweed based on the latest changes in pull #79

* Changes: reorder the build contexts ins ascending in build.yml and README.md. Add Export_tag. rectifying the issue of the previous commit.

* Change: Explicitly specify registry

---------

Co-authored-by: Nicolas Thumann <nicolas.thumann@greenbone.net>
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