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

Build docker images on all builds and publish on tag #328

Merged
merged 21 commits into from
Oct 6, 2021

Conversation

MikeGoldsmith
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith commented Oct 4, 2021

Which problem is this PR solving?

Forked builds will fail the publish_docker step because it tries to login to docker, but the username and password are in CircleCI secrets that are not shared on forked builds.

Short description of the changes

  • rename jobs to be clearer
  • update build-docker.sh to only ever build & tag docker images and publish locally (ko.local)
  • store built image in workspace and as an artefact
  • for tagged builds, publish stored image with tags

Also includes some maintenance tasks for the circle config:

  • remove custom executor as only one job used it
  • fix whitespace issues

Known issue:

  • googkleko should be cached between workflows, but $GOPATH is not expanded in the save_cache step, which means we re-install on every run

@MikeGoldsmith MikeGoldsmith added type: bug Something isn't working version: no bump A PR with maintenance or doc changes that aren't included in a release. labels Oct 4, 2021
@MikeGoldsmith MikeGoldsmith requested a review from a team October 4, 2021 12:03
@MikeGoldsmith MikeGoldsmith self-assigned this Oct 4, 2021
@MikeGoldsmith MikeGoldsmith force-pushed the mike/forked-docker branch 2 times, most recently from ac6d7b3 to 48653a1 Compare October 4, 2021 12:33
@MikeGoldsmith MikeGoldsmith added version: bump patch A PR with release-worthy changes and is backwards-compatible. and removed version: no bump A PR with maintenance or doc changes that aren't included in a release. labels Oct 4, 2021
@MikeGoldsmith MikeGoldsmith changed the title Only login to docker if going to publish Build docker images on all builds and publish on tag Oct 5, 2021
Copy link
Contributor

@vreynolds vreynolds left a comment

Choose a reason for hiding this comment

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

as a future optimization: we can cache dockerize and ko if we download the executables and cache those in a temp directory ala buildevents: https://github.com/honeycombio/buildevents-orb/blob/main/orb.yml

@MikeGoldsmith
Copy link
Contributor Author

as a future optimization: we can cache dockerize and ko if we download the executables and cache those in a temp directory ala buildevents: https://github.com/honeycombio/buildevents-orb/blob/main/orb.yml

Thanks for the suggestion - I've created #332 to track caching those 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testing docker image build+publish fails from forks
2 participants