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

Push a versioned tag of the docker image when new Scaphandre releases are created #152

Closed
rossf7 opened this issue Jan 6, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@rossf7
Copy link
Contributor

rossf7 commented Jan 6, 2022

Problem

I would like to use a tagged version of the docker image instead of the latest tag. So the version of scaphandre is predictable.

Solution

This can be automated using the docker build-push-action. This will push a new tag to docker hub when a new git tag is created.

This can be combined with the docker metadata-action which will set the latest tag according to semver and add some useful labels to the docker image.

I tried this out in my fork and it seems to work well. I just needed to disable the push step because secrets aren't passed for forked repos. Here is the action and an example run.

Alternatives

Pushing the image can be done many ways but I like the idea of using these actions since they are maintained by Docker.

@demeringo
Copy link
Contributor

demeringo commented Jan 20, 2022

@rossf7 thank you for sharing the action 👍

What I would like to see (does not means it is the right thing to do ;-) ) is getting access to both a stable (released) and unstable version (dev).

  • The stable version could be tagged as latest + vX.X.X (i.e. the git tag of the release, as suggested by @rossf7).
  • The unstable (or testing or dev) version would be based on _dev_branch.

Idea is to permit easy integration or testing of the latest functionalities (by requesting docker hub for the dev or unstable tag) while keeping the possibility to use the stable release in the general case (using either the latest or vx.x.x tag).

Does this sounds right to you ?

@rossf7
Copy link
Contributor Author

rossf7 commented Jan 21, 2022

@demeringo thanks I like the idea as it would be useful for testing the latest functionality.

It should be possible with a simple change to the github action. I'll give it a try and let you know how it goes.

on:
  push:
    branches:
      - 'dev'
    tags:
      - 'v*.*.*'

@rossf7
Copy link
Contributor Author

rossf7 commented Jan 27, 2022

@demeringo yes it works it just needs a small change to the docker-metadata action.

          tags: |
            type=ref,event=branch
            type=semver,pattern={{version}}

@bpetit What do you think to setting up this tagging?

@demeringo
Copy link
Contributor

@rossf7 @bpetit I realize that if we publish multiple images, we may also need to update doc. To explain which image should be preferabily used. I can handle this on a separate PR.

@bpetit
Copy link
Contributor

bpetit commented Mar 5, 2022

This would be great. Moreover, w'ell need different tags to provide scaphandre built with different features or sensors.

Feel free to bootstrap that in PRs, and thanks a lot.

The tagging pattern you proposed suits me well !

@rossf7
Copy link
Contributor Author

rossf7 commented Mar 6, 2022

I opened #160 to add the action.

@bpetit
Copy link
Contributor

bpetit commented Jun 15, 2022

works !

Thanks !

Capture d’écran du 2022-06-15 11-27-12

@bpetit bpetit closed this as completed Jun 15, 2022
@rossf7
Copy link
Contributor Author

rossf7 commented Jun 15, 2022

Thx! @bpetit <3

@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to Previous releases in General Jun 19, 2024
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
Status: Previous releases
Development

No branches or pull requests

3 participants