Skip to content

Commit ce74348

Browse files
committed
Updated schedule.
1 parent f199fe0 commit ce74348

2 files changed

Lines changed: 32 additions & 44 deletions

File tree

.circleci/config.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@
77
# containers defined in `docker-compose.yml` run on a *remote* Docker server
88
# controlled by CircleCI.
99
# The "runner" container uses Docker client to control the remote Docker server.
10-
#
11-
# Scheduled pipelines:
12-
# The `nightly-db` workflow requires a schedule trigger configured in CircleCI UI.
13-
# Go to Project Settings > Triggers > Add Scheduled Trigger:
14-
# - Trigger name: nightly-db
15-
# - Config source: config.yml
16-
# - Branch: develop
17-
# - Schedule: Every day at 18:00 UTC (or a custom time)
18-
# See https://www.vortextemplate.com/docs/continuous-integration/circleci
1910
#;
2011
#; Comments starting with '#;<' and '#;>' are internal Vortex comments
2112
#; and will be removed during installation or update of Vortex.
@@ -32,6 +23,11 @@ aliases:
3223
# Replace this key fingerprint with your own and remove this comment.
3324
- &deploy_ssh_fingerprint "SHA256:6d+U5QubT0eAWz+4N2wt+WM2qx6o4cvyvQ6xILETJ84"
3425

26+
#;< !PROVISION_TYPE_PROFILE
27+
# Schedule to run nightly database build (to cache the database for the next day).
28+
- &nightly_db_schedule "0 18 * * *"
29+
#;> !PROVISION_TYPE_PROFILE
30+
3531
# Shared runner container configuration applied to each job.
3632
- &runner_config
3733
working_directory: &working_directory ~/project
@@ -575,9 +571,6 @@ jobs:
575571
workflows:
576572
# Commit workflow. Runs for every commit push to the remote repository.
577573
commit:
578-
when:
579-
not:
580-
equal: [scheduled_pipeline, << pipeline.trigger_source >>]
581574
jobs:
582575
#;< !PROVISION_TYPE_PROFILE
583576
- database:
@@ -645,12 +638,14 @@ workflows:
645638

646639
#;< !PROVISION_TYPE_PROFILE
647640
# Nightly database workflow runs overnight to capture fresh database and cache it.
648-
# Requires a "nightly-db" schedule trigger configured in CircleCI UI.
649641
nightly-db:
650-
when:
651-
and:
652-
- equal: [scheduled_pipeline, << pipeline.trigger_source >>]
653-
- equal: ["nightly-db", << pipeline.schedule.name >>]
642+
triggers:
643+
- schedule:
644+
cron: *nightly_db_schedule
645+
filters:
646+
branches:
647+
only:
648+
- develop
654649
jobs:
655650
- database-nightly
656651
#;> !PROVISION_TYPE_PROFILE

.vortex/docs/content/continuous-integration/circleci.mdx

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -103,29 +103,12 @@ Add the following variables in **Project Settings → Environment Variables**:
103103

104104
### 6. Configure schedule triggers
105105

106-
Some workflows run on a schedule rather than on every push. These schedules must
107-
be configured in the CircleCI UI.
106+
If you use the self-hosted Renovate workflow for automatic dependency updates,
107+
the `update-dependencies.yml` pipeline requires a schedule trigger configured
108+
in the CircleCI UI. Without this trigger, the workflow will not run.
108109

109110
Go to **Project Settings → Triggers** and create the following scheduled
110-
triggers:
111-
112-
#### Nightly database
113-
114-
Caches a fresh database dump overnight so that builds the next day start faster.
115-
116-
| Setting | Value |
117-
|---------------|-----------------------------|
118-
| Trigger name | `nightly-db` |
119-
| Config source | `config.yml` |
120-
| Branch | `develop` |
121-
| Schedule | Every day at 18:00 UTC |
122-
123-
#### Update dependencies (optional)
124-
125-
Runs [Renovate](https://docs.renovatebot.com/) to automatically update
126-
project dependencies. Only needed if you use the self-hosted Renovate
127-
workflow provided in
128-
[`.circleci/update-dependencies.yml`](https://github.com/drevops/vortex/blob/main/.circleci/update-dependencies.yml).
111+
trigger:
129112

130113
| Setting | Value |
131114
|---------------|------------------------------------|
@@ -136,8 +119,16 @@ workflow provided in
136119

137120
:::note
138121

139-
The trigger names (`nightly-db`, `update-dependencies`) must match exactly -
140-
they are referenced in the workflow `when` conditions in the configuration files.
122+
The trigger name `update-dependencies` must match exactly - it is referenced
123+
in the workflow `when` condition in the configuration file.
124+
125+
:::
126+
127+
:::tip
128+
129+
The nightly database schedule is defined directly in `.circleci/config.yml`
130+
using the `nightly_db_schedule` YAML anchor. No UI configuration is needed
131+
for this schedule.
141132

142133
:::
143134

@@ -158,11 +149,13 @@ filters:
158149
### Update nightly database schedule
159150
160151
The nightly database job caches a fresh database dump for faster builds the next
161-
day. To change the schedule, update the trigger in the CircleCI UI under
162-
**Project Settings → Triggers → nightly-db**.
152+
day. To change when this runs, update the `nightly_db_schedule` YAML anchor
153+
in `.circleci/config.yml`
154+
([cron format](https://crontab.guru/#0_18_*_*_*), UTC timezone):
163155

164-
See [Configure schedule triggers](#6-configure-schedule-triggers) for the
165-
recommended default values.
156+
```yaml
157+
- &nightly_db_schedule "0 18 * * *" # 6 PM UTC daily
158+
```
166159

167160
### Change runner resource class
168161

0 commit comments

Comments
 (0)