civisanalytics / swagger-diff

Utility for comparing two Swagger specifications.
BSD 3-Clause "New" or "Revised" License
264 stars 32 forks source link

Docker version #49

Open AssafKatz opened 7 years ago

AssafKatz commented 7 years ago

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

jeffreyc commented 7 years ago

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?

JamesMessinger commented 6 years ago

+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 commented 6 years ago

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.

AssafKatz3 commented 6 years ago

@BigstickCarpet can you open pull request? Thanks

JamesMessinger commented 6 years ago

@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.

AssafKatz3 commented 6 years ago

@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.