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

Add CI workflow to build and publish images #4

Merged
merged 4 commits into from
Jun 30, 2023
Merged

Conversation

hasheddan
Copy link
Contributor

@hasheddan hasheddan commented Jun 30, 2023

Adds a CI workflow that validates building and publishing xk6-coap
images.

Signed-off-by: Daniel Mangum georgedanielmangum@gmail.com

Fixes #2
Fixes #3

Pins to a specific version of xk6 in the Makefile so that builds are
reproducible.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Adds an xk6-coap Dockerfile that builds a k6 distribution with xk6-coap
and includes it in a minimal distroless image.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Adds a CI workflow that validates building and publishing xk6-coap
images.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Updates README.md to inform how to run with the goliothiot/xk6-coap
image.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Copy link

@tim-golioth tim-golioth left a comment

Choose a reason for hiding this comment

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

minor, non-blocking question. otherwise LGTM!

username: goliothiot
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and Push to Dockerhub

Choose a reason for hiding this comment

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

what's the different between the Build and Export to Docker step above and this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! The build will just build the image and load it into Docker. We want to validate this on PRs and commits that aren't on main. On main we want to build and then push it, so this second "Build and Push" step will find the image we previously built and know it doesn't need to rebuild, then will push it to DockerHub 👍🏻

Choose a reason for hiding this comment

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

Oh, so the Build and Export to Docker step above is just validating that the image can be built, i.e. nothing breaks in the Dockerfile. Makes more sense now! 🎉

@hasheddan hasheddan merged commit 18aa0d8 into main Jun 30, 2023
@hasheddan hasheddan deleted the feat/img-build branch August 1, 2023 12:58
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.

Publish images with xk6-coap k6 builds Setup CI
2 participants