Use cron jobs from Circleci to trigger Docker Hub builds#312
Use cron jobs from Circleci to trigger Docker Hub builds#312ruffsl wants to merge 9 commits intoosrf:masterfrom ruffsl:circleci
Conversation
to trigger osrf/ros2: nightly and devel tags every day
nuclearsandwich
left a comment
There was a problem hiding this comment.
I'm not familiar with Circle CI's yaml format but assuming that this does what it looks like it does, LGTM.
| command: | | ||
| curl --request POST \ | ||
| --header "Content-Type: application/json" \ | ||
| --data << parameters.data >> \ |
There was a problem hiding this comment.
Are these parameters masked out of the build log and is the build log public or just the build status?
There was a problem hiding this comment.
The build logs are public for public repos, but environment variables are not expanded prior to logging the contents of the run script, nor is the token printed to stdout by the return message from the POST request. I'm not sure CircleCI masks secrets yet, it was a requested feature last I checked. But that won't be an issue here. Example:
https://circleci.com/gh/ruffsl/docker_images/23
|
@nuclearsandwich , I don't have admin to the org, so if you could click "Set Up Project" for this repo: I've already added the necessary context on CircleCI, so after the setup above, we can merge to check the CI trigger is working. Then I'll disable the workflow on my fork, and you can check the old cron jobs are disabled to avoid duplicate retriggers. |
To avoid leaking envs set in Docker Hub repo from the return json POST reply.
|
One question is that if we already have travis builds integrated. Why not use their cron functionality instead of relying on/integrating another provider? |
I don't think travis has a way to create a cron job for a individual workflow. It's sort of all or nothing, and as our current docker build PR bot is using that as a trigger to check all tracked dockerfile, I didn't want to disrupt or refactor it to be cron job aware. Did travis add features for workflow selection? |
|
If there's a reason that's fine. I just want to make sure that we're consciously choosing to add another integration. |
|
@nuclearsandwich or @tfoote , could you enable circleci for this repo now? Additionally, sence DockerHub as deprecated the ability to trigger builds from linked repos that are official images, we may need to use this same cron to keep the desktop tags on osrf/ros update as well. |
|
FYI: I triggered the nightly images manually (they didnt get triggered for 20 days). And opened an alternative to this at #348 to get a daily triggered build of those and email notification on failure. |
|
Implemented in #348 |
This has been detailed in a new issue #362 (comment) |
It seems like the server hosting the cron jobs for triggering Docker Hub builds keeps going AWOL.
I'd like to add some reliability and transparency to this task so we can keep tabs on it here in the repo.
This simply add a CircleCI config to trigger the osrf/ros2 night tags every night,
and the devel tag every day, as to spread out the build queue on docker hub.
It also triggers to build both if any changes are made to the repo.