Swagger-codegen: [docker] swagger-codegen-cli docker image - use version tags

Created on 18 Oct 2017  路  8Comments  路  Source: swagger-api/swagger-codegen

Description

Currently docker image: https://hub.docker.com/r/swaggerapi/swagger-codegen-cli/ is published only with the "latest" tag.

Suggest a enhancement

Docker image should be versioned with tag value of swagger codegen version, which it contains. This allows predictable usage of it.

Docker Suggestion

All 8 comments

swaggerapi/swagger-codegen-cli, I believe, is only intended to be "latest master" as a way to allow devs to evaluate "latest master" without pulling down and compiling the entire repository.

I have a personal image with tagged versions if needed: https://hub.docker.com/r/jimschubert/swagger-codegen-cli/tags/.

But I agree it would make more sense to have officially versioned developer images based on tags.

I second this. It would be nice to have version tags for the cli image as well. It is especially useful for people who want to automate their swagger binding generation via CI/CD and do not want to deal with the stability issues that come with running what is effectively a nightly build.

@ffledgling

Hooking Swagger Codegen into your CI/CD process is as easy as pulling the jar from Maven and executing it:

https://gist.github.com/jimschubert/62baf653a9520b23399a67755c33631a

And if you're using Maven, there's a Maven plugin for Swagger Codegen which tracks the same tagged version as the CLI.

The docker image tagging is necessary mainly for those who don't want Java installed or who can't install the version of Java required by Swagger Codegen.

thank you @jimschubert, a tagged version of swagger-codegen-cli was exactly what i was looking for.

it looks like the official swagger-generator has tagged versions https://hub.docker.com/r/swaggerapi/swagger-generator/tags/ although this is an http interface instead of cli

I've asked @webron to do it as part of the 2.3.1 release. He's probably too busy these days and I think he will do it soon.

Both v2.3.0 and v2.3.1 of the cli have been tagged and pushed. Maybe there _is_ a bright side to me flying too much.

Thanks. I'll uncomment the CircleCI config file to resume the build for Swagger Codegen CLI image.

FYI. Resume docker build of Swagger Codegen CLI via 4b428e8

Was this page helpful?
0 / 5 - 0 ratings