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

Publish Inso CLI docker images (INS-1238) #4722

Conversation

filfreire
Copy link
Member

@filfreire filfreire commented Apr 22, 2022

This PR adds needed functionality for us to start publishing inso-cli docker images.

How to test docker image locally:

  • Checkout this branch
  • Download the .tar of inso CLI Linux artifact into the packages/insomnia-inso/artifacts/ folder.
  • Build container:
docker build --tag insomnia-inso:latest ./packages/insomnia-inso/
  • Run typical inso commands by mounting on folder where you have .insomnia data, e.g.:
docker run -it --rm -v $(pwd):/var/temp insomnia-inso:latest generate config -w /var/temp -f json

changelog(Improvements): We now publish Docker images for Inso CLI at https://hub.docker.com/r/kong/inso

DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_REGISTRY: docker.io
DOCKER_IMAGE: kongcloud/insomnia-inso
DOCKER_LATEST_TAG: ${{ env.IS_PRERELEASE == 'false' && 'latest' || contains(github.event.inputs.version, 'alpha') && 'alpha' || 'beta' }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this for the latest-like tags besides the specific version tags.

  • If it's a stable release - we'll update the latest tag
  • If it's a beta or alpha release - we'll update beta or alpha tags respectively (acting as a latest tag for beta/alpha track

cc @DMarby @johnwchadwick

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

@dimitropoulos
Copy link
Contributor

tell me if this is out of scope: but I'm worried that this will break in the future and we won't know. is there some way to do a quick sanity check on the completed image to verify it works?

Copy link
Contributor

@johnwchadwick johnwchadwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

COPY ./artifacts/inso-linux-*.tar.xz /tmp/inso.tar.xz
RUN tar -C /usr/bin -xvf /tmp/inso.tar.xz

FROM docker.io/alpine as binary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: It might? be a good idea to pin an exact alpine release here. I don't anticipate this will ever be an issue, though.

@DMarby
Copy link
Contributor

DMarby commented May 5, 2022

tell me if this is out of scope: but I'm worried that this will break in the future and we won't know. is there some way to do a quick sanity check on the completed image to verify it works?

I agree with this sentiment in general. I think it's out of scope for publishing/this PR, we intentionally don't run tests in these workflows to keep them simple, quick and error-free, but it would be good to create a linear ticket to follow up on this, as we have similar issues for other publishing methods as well, eg ensuring installing inso and running it from npm actually works correctly, so in the longer term we need to figure out an approach how to test those cases more robustly (whether that's by implementing additional checks in our existing Test pipeline running on every PR, or some other pipeline running more infrequently, etc)

@filfreire
Copy link
Member Author

@DMarby @dimitropoulos I've added a new linear issue to triage to follow-up on doing sanity checks for the inso docker image - INS-1525

@johnwchadwick I agree with pinning alpine to a proper version, will edit the PR.

@filfreire filfreire merged commit e34e80e into Kong:develop May 9, 2022
@filfreire filfreire deleted the feature/ins-1238-publish-inso-cli-docker-images branch October 11, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants