swagger-diff icon indicating copy to clipboard operation
swagger-diff copied to clipboard

Docker version

Open AssafKatz opened this issue 8 years ago • 6 comments
trafficstars

Hi, This seems to be good for CI, but requires manual installation. Is it possible to create Docker image for it? Thanks, Assaf

AssafKatz avatar Aug 06 '17 12:08 AssafKatz

Thank you for your feedback. We don't currently have any plans to create a Docker image, as we install it via Bundler or Ruby's gem command. What's your use case for wanting a Docker image?

jeffreyc avatar Aug 07 '17 14:08 jeffreyc

+1

There are a few unofficial Docker images that have been created by the community, but I'd also love to see an "official" Docker image that's published by Civis.

The use-case is simply having an entirely self-contained version of the CLI that encapsulates all dependencies (Ruby, etc.) without any risk of version conflicts, incompatibility, etc.

JamesMessinger avatar Mar 27 '18 15:03 JamesMessinger

I went ahead and created a Docker image for myself. Feel free to copy this one and publish it as the "official" image if you want.

JamesMessinger avatar Mar 27 '18 18:03 JamesMessinger

@BigstickCarpet can you open pull request? Thanks

AssafKatz3 avatar Mar 28 '18 06:03 AssafKatz3

@AssafKatz - There are (at least) four steps that need to be taken. I could submit a PR, but it would only take care of the first step.

Step 1 - Create a Dockerfile Add this Dockerfile to the project.

Step 2 - Add tests Write tests to verify that the Docker image works as expected. Basically, test that the console output matches the expected output for compatible & incompatible API definitions.

Unfortunately, I don't know Ruby, and I'm not familiar with Rake or Bundler. So I don't know how to write these tests.

Step 3 - Publish the Docker image to DockerHub Someone at Civis Analytics will need to create a DockerHub account and publish the swagger-diff image under that account.

Step 4 - Publish new Docker images for each new release Every time a new version of swagger-diff is released, a new Docker image will need to be published to DockerHub. Ideally, this would be automated as part of the build script or CI/CD script.

JamesMessinger avatar Mar 28 '18 16:03 JamesMessinger

@BigstickCarpet The problematic part is step 2, given that currently the project doesn't have tests at all. I asked you to do pull request for step 1. Since I opened this issue, I learnt how to do step 3 & 4.

AssafKatz3 avatar Mar 29 '18 06:03 AssafKatz3