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

Variable or file with release tag #84

Closed
avalor1 opened this issue Mar 23, 2023 · 5 comments
Closed

Variable or file with release tag #84

avalor1 opened this issue Mar 23, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@avalor1
Copy link

avalor1 commented Mar 23, 2023

Description

It would be nice if one could see the used version of the DMC.

Maybe as environment variable or a file named like the version or with the version in it.

Additional information

No response

@avalor1 avalor1 added the enhancement New feature or request label Mar 23, 2023
@rndmh3ro
Copy link
Collaborator

IMO this should happen during the build-step, something like:

docker build --label dmc-version=${GITHUB_DMC_TAG} -t ${DMC_IMAGE} $CI_PROJECT_DIR/docker/$SERVICE_NAME

You can then check the version like this:

> docker inspect foo --format '{{ json .Config.Labels }}' | jq .
{
  "dmc-version": "3.1.0",
  "org.wakemeops.base_image": "\"docker.io/ubuntu:latest\"",
  "org.wakemeops.commit": "\"65d81642eb025d20c4db5b45758879b379bc6aa1\"",
  "org.wakemeops.maintainers": "\"WakeMeOps <wakemeops.com>\""
}

@rndmh3ro
Copy link
Collaborator

@avalor1 does this work for you?

@avalor1
Copy link
Author

avalor1 commented May 3, 2023

Nope, this does not work. When using the latest Tag i cannot see this label. Neither while running the container or when inspecting the downloaded image

@michaelamattes
Copy link
Collaborator

Add build label to gitlab-ci includable #92

@avalor1
Copy link
Author

avalor1 commented May 25, 2023

Thanks, it actually did work. I forgot to mention it here 🙈

@avalor1 avalor1 closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants