Skip to content

update circleci to build image and push to dockerhub, pending approval - #1065

Merged
mockdeep merged 2 commits into
stringer-rss:mainfrom
guidopetri:ci-build-docker
Jul 24, 2023
Merged

mockdeep merged 2 commits into
stringer-rss:mainfrom
guidopetri:ci-build-docker

Conversation

@guidopetri

@guidopetri guidopetri commented Jul 22, 2023 •

Copy link
Copy Markdown
Collaborator

Confidence that this will work: 0% :)

I renamed the previous build job to run_tests, since it seemed more apt, if we're adding a "build the docker image" step. I think this requires a change on the github repo / PR config, though, so I'm fine reverting that change.

This PR hopefully adds the build-and-publish-image workflow, which waits for tests to run + waits for an approval from a maintainer / someone with merge access to the repo to run it. I think we need to create the stringer-rss Dockerhub user/organization, and we must use DOCKER_LOGIN and DOCKER_PASSWORD env vars but I'm not sure where to place them in the CI file in a safe way. (is this something we set up in CircleCI itself as a secret?)

@guidopetri
guidopetri force-pushed the ci-build-docker branch 7 times, most recently from d6306c5 to 9fe1f2f Compare July 22, 2023 20:37
@guidopetri
guidopetri marked this pull request as ready for review July 22, 2023 20:46
@guidopetri

Copy link
Copy Markdown
Collaborator Author

@mockdeep action item requests for you:

  • (decide whether we want to use Dockerhub or GHCR)
  • create the stringer-rss org on Dockerhub
  • test the "wait for approval" step on CircleCI - you should be able to just click somewhere to unblock the build
  • (potentially) change the github PR config to require run-tests instead of build
  • and finally, review that I haven't screwed up anything on the CircleCI config file :)

Comment thread .circleci/config.yml Resolved

@mockdeep mockdeep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks so much for this @guidopetri! I've added some suggestions. I added the env variables on CircleCI, but the build still didn't work. I think that's because CircleCI doesn't pass env variables to forked builds for security, so I think that probably makes my suggestion to build only on main a better way.

Comment thread .circleci/config.yml Resolved
Comment thread .circleci/config.yml Resolved
@guidopetri

Copy link
Copy Markdown
Collaborator Author

I think that's because CircleCI doesn't pass env variables to forked builds for security, so I think that probably makes my suggestion to build only on main a better way.

How confident are you that it'll work? :D We can try merging to main and seeing what happens, and opening another PR for fixes if necessary.

As for the commit I just added, I thought it'd be more convenient for you to review a separate commit, but we can squash everything later.

@mockdeep

Copy link
Copy Markdown
Collaborator

Looks great! Thanks so much for this!

How confident are you that it'll work?

Well, I'm more confident that we can revert if it doesn't work out, so worth a try!

@mockdeep
mockdeep merged commit a8146f3 into stringer-rss:main Jul 24, 2023
@guidopetri
guidopetri deleted the ci-build-docker branch July 26, 2023 23:08
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.

2 participants