Skip to content

Commit bc7fb07

Browse files
committed
Switched back to config.yml.
1 parent 42730f3 commit bc7fb07

83 files changed

Lines changed: 1705 additions & 1445 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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: build-test-deploy.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

.circleci/vortex-test-common.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto-generated by .vortex/tests/generate-vortex-dev-circleci
2-
# Source: .circleci/build-test-deploy.yml
2+
# Source: .circleci/config.yml
33
# Do not edit directly.
44
version: '2.1'
55

@@ -14,6 +14,11 @@ aliases:
1414
# Replace this key fingerprint with your own and remove this comment.
1515
- &deploy_ssh_fingerprint "SHA256:6d+U5QubT0eAWz+4N2wt+WM2qx6o4cvyvQ6xILETJ84"
1616

17+
#;< !PROVISION_TYPE_PROFILE
18+
# Schedule to run nightly database build (to cache the database for the next day).
19+
- &nightly_db_schedule "0 18 * * *"
20+
#;> !PROVISION_TYPE_PROFILE
21+
1722
# Shared runner container configuration applied to each job.
1823
- &runner_config
1924
working_directory: &working_directory ~/project

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

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ same provider, you can use a single key for both operations.
8484

8585
CircleCI uses SSH key fingerprints to load the correct keys into the runner
8686
container. Update the YAML anchors in your
87-
[`.circleci/build-test-deploy.yml`](https://github.com/drevops/vortex/blob/main/.circleci/build-test-deploy.yml)
87+
[`.circleci/config.yml`](https://github.com/drevops/vortex/blob/main/.circleci/config.yml)
8888
file:
8989

9090
- `db_ssh_fingerprint` - your database download SSH key fingerprint
@@ -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 | `build-test-deploy.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

@@ -147,7 +138,7 @@ they are referenced in the workflow `when` conditions in the configuration files
147138

148139
The `deploy` job only runs for specific branch patterns. To modify which branches
149140
trigger deployments, update the `only` filter regex in the `deploy` job under
150-
the `workflows` section of `.circleci/build-test-deploy.yml`:
141+
the `workflows` section of `.circleci/config.yml`:
151142

152143
```yaml
153144
filters:
@@ -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

.vortex/installer/src/Prompts/Handlers/CiProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function discover(): null|string|bool|array {
6464
return self::GITHUB_ACTIONS;
6565
}
6666

67-
if (is_readable($this->dstDir . '/.circleci/build-test-deploy.yml') || is_readable($this->dstDir . '/.circleci/config.yml')) {
67+
if (is_readable($this->dstDir . '/.circleci/config.yml')) {
6868
return self::CIRCLECI;
6969
}
7070

.vortex/installer/src/Prompts/Handlers/DependencyUpdatesProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ public function discover(): null|string|bool|array {
6262
return self::RENOVATEBOT_CI;
6363
}
6464

65-
if (File::contains($this->dstDir . '/.circleci/build-test-deploy.yml', 'update-dependencies')
66-
|| File::contains($this->dstDir . '/.circleci/config.yml', 'update-dependencies')) {
65+
if (File::contains($this->dstDir . '/.circleci/config.yml', 'update-dependencies')) {
6766
return self::RENOVATEBOT_CI;
6867
}
6968

.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/.circleci/build-test-deploy.yml renamed to .vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/config.yml

Lines changed: 10 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: build-test-deploy.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
version: '2.1'
2011

2112
aliases:
@@ -27,6 +18,9 @@ aliases:
2718
# Replace this key fingerprint with your own and remove this comment.
2819
- &deploy_ssh_fingerprint "SHA256:6d+U5QubT0eAWz+4N2wt+WM2qx6o4cvyvQ6xILETJ84"
2920

21+
# Schedule to run nightly database build (to cache the database for the next day).
22+
- &nightly_db_schedule "0 18 * * *"
23+
3024
# Shared runner container configuration applied to each job.
3125
- &runner_config
3226
working_directory: &working_directory ~/project
@@ -482,9 +476,6 @@ jobs:
482476
workflows:
483477
# Commit workflow. Runs for every commit push to the remote repository.
484478
commit:
485-
when:
486-
not:
487-
equal: [scheduled_pipeline, << pipeline.trigger_source >>]
488479
jobs:
489480
- database:
490481
filters:
@@ -527,11 +518,13 @@ workflows:
527518
only: /^[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
528519

529520
# Nightly database workflow runs overnight to capture fresh database and cache it.
530-
# Requires a "nightly-db" schedule trigger configured in CircleCI UI.
531521
nightly-db:
532-
when:
533-
and:
534-
- equal: [scheduled_pipeline, << pipeline.trigger_source >>]
535-
- equal: ["nightly-db", << pipeline.schedule.name >>]
522+
triggers:
523+
- schedule:
524+
cron: *nightly_db_schedule
525+
filters:
526+
branches:
527+
only:
528+
- develop
536529
jobs:
537530
- database-nightly

.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.github/workflows/-build-test-deploy.yml

Whitespace-only changes.

.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/CircleCiConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CircleCiConfigTest extends TestCase {
3434
*/
3535
protected function setUp(): void {
3636
parent::setUp();
37-
$file = file_get_contents(__DIR__ . '/../../.circleci/build-test-deploy.yml');
37+
$file = file_get_contents(__DIR__ . '/../../.circleci/config.yml');
3838
if (!$file) {
3939
throw new \RuntimeException('Unable to read CircleCI config file.');
4040
}

.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/.circleci/build-test-deploy.yml renamed to .vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.circleci/config.yml

Lines changed: 10 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: build-test-deploy.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
version: '2.1'
2011

2112
aliases:
@@ -27,6 +18,9 @@ aliases:
2718
# Replace this key fingerprint with your own and remove this comment.
2819
- &deploy_ssh_fingerprint "SHA256:6d+U5QubT0eAWz+4N2wt+WM2qx6o4cvyvQ6xILETJ84"
2920

21+
# Schedule to run nightly database build (to cache the database for the next day).
22+
- &nightly_db_schedule "0 18 * * *"
23+
3024
# Shared runner container configuration applied to each job.
3125
- &runner_config
3226
working_directory: &working_directory ~/project
@@ -482,9 +476,6 @@ jobs:
482476
workflows:
483477
# Commit workflow. Runs for every commit push to the remote repository.
484478
commit:
485-
when:
486-
not:
487-
equal: [scheduled_pipeline, << pipeline.trigger_source >>]
488479
jobs:
489480
- database:
490481
filters:
@@ -527,11 +518,13 @@ workflows:
527518
only: /^[0-9]+(\.[0-9]+){2}(-rc\.[0-9]+)?$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(\.[0-9]+)?$/
528519

529520
# Nightly database workflow runs overnight to capture fresh database and cache it.
530-
# Requires a "nightly-db" schedule trigger configured in CircleCI UI.
531521
nightly-db:
532-
when:
533-
and:
534-
- equal: [scheduled_pipeline, << pipeline.trigger_source >>]
535-
- equal: ["nightly-db", << pipeline.schedule.name >>]
522+
triggers:
523+
- schedule:
524+
cron: *nightly_db_schedule
525+
filters:
526+
branches:
527+
only:
528+
- develop
536529
jobs:
537530
- database-nightly

.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/.github/workflows/-build-test-deploy.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)