-
Notifications
You must be signed in to change notification settings - Fork 6k
Docker image tags #6837
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
Docker image tags #6837
Conversation
2748ae7 to
b075542
Compare
| environment: | ||
| DOCKER_GENERATOR_IMAGE_NAME: swaggerapi/swagger-generator | ||
| DOCKER_CODEGEN_CLI_IMAGE_NAME: swaggerapi/swagger-codegen-cli | ||
| DOCKER_BUILD_TAG: 2.2.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jebentier thanks for the enhancement. Should this be 2.3.0-SNAPSHOT instead? (the latest master is 2.3.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically the image tags should match the git tags. To make it dynamic using a git command like such:
tag=$(git tag -l --points-at HEAD) ; if [[ -z "$tag" ]]; then echo "latest" ; else echo "$tag" ; fi
If there is no tag on the current commit, you get back "latest" otherwise you get the tag which would have been v2.2.3 if that commit was the one being built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done more easily in Docker Hub as an automated build. Probably a silly question, but @wing328 do you know if there's a reason it's set up in CI rather than in Docker Hub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jimschubert sorry I don't have an answer as it's setup by Tony.
cc @fehguy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kenjones-cisco thanks for the explanation. If it's within Docker user's expectation that 2.2.3 can refer to the Docker image built by the latest master (2.3.0), then it's totally fine with me.
|
Bump, I'd like to see this merged. What needs to be modified to get this PR merged (or have tags on the docker images a different way)? Looks like at the least the tag needs to updated to 2.3.0 (but that seems incorrect-ish?) or alternatively the tag needs to be auto-extracted from git. @wing328 ? |
|
@ffledgling not that I don't want to merge but I'm busy with other tasks at the moment. I'll take a deeper look into tags on docker image this coming weekend and merge this PR if I don't have any more question. |
|
CircleCI reported the following errors: Ref: https://circleci.com/gh/swagger-api/swagger-codegen/2610 Anyone has any clue about the error? We will need to roll back the change if we can resolve this. |
|
master should be |
|
The error is because the docker tag is using To do this via CI, you will need a script that determines if the current commit being built has a tag, if no tag then it is |
|
OK. I'll have another look tomorrow. |
* Revert "[csharp] clean boolean additional properties 6784 (#6899)" This reverts commit 2c9f98c. * Revert "[Swift4] Add throw to reserved words (#6952)" This reverts commit 970de01. * Revert "add a docker build tag for pushing docker image instead of just latest (#6837)" This reverts commit 4e482ee.
|
I've rolled back this change. I think what we need to do is to tag the docker image in the next release (in Docker Hub). |
|
So is the final resolution on this that new releases will have manually added version number in the docker releases? If that's the case, it looks like it did not happen for v2.3.0. |
|
@ffledgling yup, and you're right there's no tagging for v2.3.0. I do not have right to do it in dockerhub. @webron is very busy these days and we'll do it for v2.3.1 instead, which will be released very soon. |
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.3.0.0branch for changes related to OpenAPI spec 3.0. Default:master.Description of the PR
Added a docker build tag to the circle.yml file so that when the images are pushed, a version tag is pushed as well at latest.
fix #6728