You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll/_cci2/workflows.md
+8-14Lines changed: 8 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ With workflows, you can:
25
25
- Fan-out to run multiple jobs in parallel for efficient version testing.
26
26
- Fan-in to quickly deploy to multiple platforms.
27
27
28
-
For example, if only one job in a workflow fails, you will know it is failing in real-time. Instead of wasting time waiting for the entire build to fail and re-running the entire job set, you can rerun *just the failed job*.
28
+
For example, if only one job in a workflow fails, you will know it is failing in real-time. Instead of wasting time waiting for the entire build to fail and rerunning the entire job set, you can rerun *just the failed job*.
29
29
30
30
### States
31
31
{:.no_toc}
@@ -44,7 +44,7 @@ Workflows may appear with one of the following states:
44
44
### Limitations
45
45
{:.no_toc}
46
46
47
-
Projects that have pipelines enabled during pipeline processing may use the CircleCI API to trigger workflows. Projects that do not enable pipelines will run as if the workflows did not exist when triggered by the API. **Note:**Pipelines without workflows require a `build` job.
47
+
Projects that have pipelines enabled may use the CircleCI API to trigger workflows. Projects that do not enable pipelines will run as if the workflows did not exist when triggered by the API. **Note:**Builds without workflows require a `build` job.
48
48
49
49
Refer to the [Workflows]({{ site.baseurl }}/2.0/faq) section of the FAQ for additional information and limitations.
50
50
@@ -90,7 +90,6 @@ The following example shows a workflow with four sequential jobs. The jobs run a
90
90
The following `config.yml` snippet is an example of a workflow configured for sequential job execution:
91
91
92
92
```yaml
93
-
version: 2.1
94
93
workflows:
95
94
version: 2
96
95
build-test-and-deploy:
@@ -121,7 +120,6 @@ The illustrated example workflow runs a common build job, then fans-out to run a
121
120
The following `config.yml` snippet is an example of a workflow configured for fan-out/fan-in job execution:
122
121
123
122
```yaml
124
-
version: 2.1
125
123
workflows:
126
124
version: 2
127
125
build_accept_deploy:
@@ -152,11 +150,12 @@ See the [Sample Fan-in/Fan-out Workflow config](https://github.com/CircleCI-Publ
152
150
153
151
## Holding a Workflow for a Manual Approval
154
152
155
-
Workflows can be configured to wait for manual approval of a job before continuing to the next job. Anyone who has push access to the repository can click the Approval button to continue the workflow. To do this, add a job to the `jobs` list with the
153
+
Workflows can be configured to wait for manual approval of a job before
154
+
continuing to the next job. Anyone who has push access to the repository can click the Approval button to continue the workflow.
155
+
To do this, add a job to the `jobs` list with the
156
156
key `type: approval`. Let's look at a commented config example.
157
157
158
158
```yaml
159
-
version: 2.1
160
159
# ...
161
160
# << Your config for the build, test1, test2, and deploy jobs >>
162
161
# ...
@@ -188,7 +187,8 @@ The outcome of the above example is that the `deploy:` job will not run until yo
188
187
Some things to keep in mind when using manual approval in a workflow:
189
188
190
189
- `approval`is a special job type that is **only** available to jobs under the `workflow` key
191
-
- The `hold` job must be a unique name not used by any other job; that is, your custom configured jobs, such as `build` or `test1` in the example above wouldn't be given a `type: approval` key.
190
+
- The `hold` job must be a unique name not used by any other job.
191
+
- that is, your custom configured jobs, such as `build` or `test1` in the example above wouldn't be given a `type: approval` key.
192
192
- The name of the job to hold is arbitrary - it could be `wait` or `pause`, for example, as long as the job has a `type: approval` key in it.
193
193
- All jobs that are to run after a manually approved job _must_ `require:` the name of that job. Refer to the `deploy:` job in the above example.
194
194
- Jobs run in the order defined until the workflow processes a job with the `type: approval` key followed by a job on which it depends.
@@ -218,7 +218,6 @@ By default, a workflow is triggered on every `git push`. To trigger a workflow o
218
218
In the example below, the `nightly` workflow is configured to run every day at 12:00am UTC. The `cron` key is specified using POSIX `crontab` syntax, see the [crontab man page](https://www.unix.com/man-page/POSIX/1posix/crontab/) for `cron` syntax basics. The workflow will be run on the `master` and `beta` branches.
219
219
220
220
```yaml
221
-
version: 2.1
222
221
workflows:
223
222
version: 2
224
223
commit:
@@ -268,7 +267,6 @@ The following example shows a workflow with four sequential jobs that use a cont
268
267
The following `config.yml` snippet is an example of a sequential job workflow configured to use the resources defined in the `org-global` context:
269
268
270
269
```yaml
271
-
version: 2.1
272
270
workflows:
273
271
version: 2
274
272
build-test-and-deploy:
@@ -299,7 +297,6 @@ The following example shows a workflow configured with jobs on three branches: D
299
297
The following `config.yml` snippet is an example of a workflow configured for branch-level job execution:
300
298
301
299
```yaml
302
-
version: 2.1
303
300
workflows:
304
301
version: 2
305
302
dev_stage_pre-prod:
@@ -336,7 +333,6 @@ In the example below, two workflows are defined:
336
333
- `tagged-build`runs `build` for all branches **and** all tags starting with `v`.
337
334
338
335
```yaml
339
-
version: 2.1
340
336
workflows:
341
337
version: 2
342
338
untagged-build:
@@ -356,7 +352,6 @@ In the example below, two jobs are defined within the `build-n-deploy` workflow:
356
352
- The `deploy` job runs for no branches and only for tags starting with 'v'.
357
353
358
354
```yaml
359
-
version: 2.1
360
355
workflows:
361
356
version: 2
362
357
build-n-deploy:
@@ -382,7 +377,6 @@ In the example below, three jobs are defined with the `build-test-deploy` workfl
382
377
- The `deploy` job runs for no branches and only tags starting with 'config-test'.
383
378
384
379
```yaml
385
-
version: 2.1
386
380
workflows:
387
381
version: 2
388
382
build-test-deploy:
@@ -517,7 +511,7 @@ It has been observed that in some cases, a failure happens before the workflow r
517
511
518
512
When creating or modifying workflow configuration, if you don't see new jobs, you may have a configuration error in `config.yml`.
519
513
520
-
Sometimes, if you do not see your workflows triggering, a configuration error is preventing the workflow from starting. As a result, the workflow does not start any jobs.
514
+
Oftentimes if you do not see your workflows triggering, a configuration error is preventing the workflow from starting. As a result, the workflow does not start any jobs.
521
515
522
516
When setting up workflows, you currently have to check your Workflows page of the CircleCI app (*not* the Job page) to view the configuration errors.
0 commit comments