mirror of
https://github.com/enocom/gopher-reading-list.git
synced 2026-05-15 14:15:49 -06:00
[GH-ISSUE #97] Configure cron job on Circle CI #82
Labels
No labels
advanced
beginner
intermediate
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gopher-reading-list#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @enocom on GitHub (Feb 4, 2019).
Original GitHub issue: https://github.com/enocom/gopher-reading-list/issues/97
One of the things we lost when transferring to Circle CI was running a build every 24 hours.
@mvxt If you have the time to do this, I would be grateful. Otherwise, I'm happy to handle it. You've done all the hard work.
@mvxt commented on GitHub (Feb 4, 2019):
@enocom Here's one of the snippets I've used to configure nightly builds.
In short you'll want to specify workflows. So I'd add the following snippets to your config.yml file:
workflowsis a top-level item with version specification followed by various other parameters. In the above snippet we've defined two workflows: the first is the normal workflow which is always triggered on push to repo.The second one is the one that is triggered to run once a day via CRON. I also added an additional filter so that we only run nightly builds on the master branch, and no other branches. You can omit that if you'd like.
Hope this makes sense and helps.
The "build-pipeline" and "nightly" workflow labels are just names you can arbitrarily change. What's important is that the "jobs" section underneath lists the exact job names for jobs you've defined above.
Actually, I think that since your main job is just called "build" you might not even need to specify the 1st workflow because by default CircleCI implicitly looks for a
buildjob. If you decide to rename the "build" job to something else though then you'll need to specify a workflow for it so CircleCI knows what job it should look for.