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
docs: move docker and container documentation to top-level page (#634)
## 📝 Description
Move the documentation of Docker and Containers to the top level page in
the sidebar. Reorganizes information about Docker and Container in one
place so it's easy to find and search.
Addresses #630
## ✅ Checklist
- [X] I have tested this change
- [ ] This change requires documentation update
Copy file name to clipboardExpand all lines: docs/docs/reference/pipeline-yaml.md
+9-21Lines changed: 9 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
description: Pipeline YAML reference
3
3
---
4
4
5
-
# Pipeline YAML
5
+
# Pipeline YAML
6
6
7
7
This page describes the formal pipeline YAML specification for Semaphore.
8
8
@@ -43,7 +43,7 @@ Defines the global agent's [`machine` type](#machine) and [`os_image`](#os-image
43
43
The `agent` can contain the following properties:
44
44
45
45
- [`machine`]: VM machine type to run the jobs
46
-
- [`containers`]: optional Docker containers to run the jobs
46
+
- [`containers`](#containers): optional Docker containers to run the jobs
47
47
48
48
```yaml title="Example"
49
49
# highlight-next-line
@@ -61,7 +61,7 @@ The default `agent` can be overridden [inside `tasks`](#agent-in-task).
61
61
62
62
### machine {#machine}
63
63
64
-
Part of the [`agent`](#agent) definition. It defines the global VM machine type to run the jobs.
64
+
Part of the [`agent`](#agent) definition. It defines the global VM machine type to run the jobs.
65
65
66
66
It requires two properties:
67
67
@@ -108,7 +108,7 @@ machine:
108
108
109
109
## containers {#containers}
110
110
111
-
An optional part of [`agent`](#agent). Defines an array of Docker image names to run jobs.
111
+
An optional part of [`agent`](#agent). Defines an array of Docker image names to run jobs.
112
112
113
113
The first container in the list runs the jobs. You may optionally add more items that run as separate containers. All containers can reference each other via their names, which are mapped to hostnames using DNS records.
114
114
@@ -252,6 +252,7 @@ agent:
252
252
Defines an optional time limit for executing the pipeline. Jobs are forcibly terminated once the time limit is reached. The default value is 1 hour.
253
253
254
254
The `execution_time_limit` property accepts one of two options:
255
+
255
256
- `hours`: time limit expressed in hours. Maximum value is 24
256
257
- `minutes`: The time limit is expressed in minutes. The maximum value is 1440
257
258
@@ -400,7 +401,7 @@ The following rules apply:
400
401
401
402
When `scope: project` the queues with the same values for the `name` property in different projects are not queued together.
402
403
403
-
When `scope: organization` the pipelines from the queue will be queued together with pipelines from other projects within the organization that have a queue configuration with the same `name` and `scope` values.
404
+
When `scope: organization` the pipelines from the queue will be queued together with pipelines from other projects within the organization that have a queue configuration with the same `name` and `scope` values.
404
405
405
406
The `processing` property can have two values:
406
407
@@ -428,7 +429,6 @@ Sets a strategy for auto-canceling pipelines in a queue when a new pipeline appe
428
429
429
430
At least one of them is required. If both are set, `running` will be evaluated first.
430
431
431
-
432
432
### running {#running-in-auto-cancel}
433
433
434
434
When this property is set, queued and running pipelines are canceled as soon as a new workflow is triggered. This property requires a `when` property that defines a condition according to [Conditions DSL](./conditions-dsl).
@@ -801,7 +801,6 @@ The indentation level of the `prologue`, `epilogue`, `env_vars`, and `jobs` prop
801
801
802
802
:::
803
803
804
-
805
804
### prologue {#prologue-in-task}
806
805
807
806
A `prologue` block in a `task` block is used when you want to execute certain commands prior to the commands of each job of a given `task`. This is usually the case with initialization commands that install software, start or stop services, etc.
@@ -911,7 +910,7 @@ The location of the file is relative to the pipeline file. For example, if your
911
910
912
911
### secrets {#secrets-in-task}
913
912
914
-
A [secret](../using-semaphore/secrets) is a place for keeping sensitive information in the form of environment variables and small files. Sharing sensitive data in secret is both safer and more flexible than storing it using plain text files or environment variables that anyone can access.
913
+
A [secret](../using-semaphore/secrets) is a place for keeping sensitive information in the form of environment variables and small files. Sharing sensitive data in secret is both safer and more flexible than storing it using plain text files or environment variables that anyone can access.
915
914
916
915
The `secrets` property is used for importing all the environment variables and files from an existing secret into a Semaphore organization.
917
916
@@ -1181,7 +1180,6 @@ The following environment variables are added to each generated job:
1181
1180
- `SEMAPHORE_JOB_COUNT`: total number of jobs generated via the `parallelism` property
1182
1181
- `SEMAPHORE_JOB_INDEX`: value in the range from `1` to `SEMAPHORE_JOB_COUNT`, which represents the index of a particular job in the list of generated jobs.
1183
1182
1184
-
1185
1183
```yaml title="Example"
1186
1184
version: v1.0
1187
1185
name: Using the parallelism property
@@ -1201,14 +1199,14 @@ blocks:
1201
1199
- echo Job $SEMAPHORE_JOB_INDEX out of $SEMAPHORE_JOB_COUNT
1202
1200
- make test PARTITION=$SEMAPHORE_JOB_INDEX
1203
1201
```
1202
+
1204
1203
It will automatically create 4 jobs with the following names:
1205
1204
1206
1205
- `Parallel job - 1/4`
1207
1206
- `Parallel job - 2/4`
1208
1207
- `Parallel job - 3/4`
1209
1208
- `Parallel job - 4/4`
1210
1209
1211
-
1212
1210
:::note
1213
1211
1214
1212
It is not possible to have both `parallelism` and [`matrix`](#matrix-in-jobs) properties defined for the same job, as `parallelism` functionality is a subset of `matrix` functionality.
@@ -1495,7 +1493,6 @@ blocks:
1495
1493
1496
1494
All the displayed files are correct pipeline YAML files that could be used as `semaphore.yml` files.
1497
1495
1498
-
1499
1496
### result {#result-in-promotions}
1500
1497
1501
1498
The value of the `result` property is a string that is used for matching the status of a pipeline.
@@ -1714,10 +1711,9 @@ The following functions are supported. Refer to the [Sprout documentation](https
1714
1711
</div>
1715
1712
</details>
1716
1713
1717
-
1718
1714
### Pipeline name {#parameter-pipeline-name}
1719
1715
1720
-
The following example customizes the pipeline name given the parameters `DEPLOY_ENV` and `SERVER`.
1716
+
The following example customizes the pipeline name given the parameters `DEPLOY_ENV` and `SERVER`.
1721
1717
1722
1718
```yaml title="deploy.yml"
1723
1719
version: v1.0
@@ -1816,7 +1812,6 @@ blocks:
1816
1812
commands: ./deploy.sh
1817
1813
```
1818
1814
1819
-
1820
1815
### Global config {#parameter-global}
1821
1816
1822
1817
You can use parameters in the [global config](#global-job-config) for the pipeline.
@@ -1841,7 +1836,6 @@ global_job_config:
1841
1836
1842
1837
The following example shows how to dynamically assign pipelines to [names queues](../using-semaphore/pipelines#named-queues) with parameters.
1843
1838
1844
-
1845
1839
```yaml title="deploy.yml"
1846
1840
version: v1.0
1847
1841
name: Deployment pipeline
@@ -1885,7 +1879,6 @@ blocks:
1885
1879
1886
1880
You can define a [job matrix](../using-semaphore/jobs#matrix) with parameters. Given `AWS_REGIONS=us-central-1,us-east1`, the following example runs the `deploy.sh` script both regions by transforming the comma-separated regions in a YAML list.
1887
1881
1888
-
1889
1882
```yaml title="deploy.yml"
1890
1883
version: v1.0
1891
1884
name: Deployment pipeline
@@ -2037,7 +2030,6 @@ The `auto_promote_on` property is a list of items that supports three properties
2037
2030
2038
2031
For an `auto_promote_on` branch to execute, the return values of all the used properties of that branch must be `true`.
2039
2032
2040
-
2041
2033
<details>
2042
2034
<summary>`auto_promote_on` example</summary>
2043
2035
<div>
@@ -2141,7 +2133,6 @@ Both `p1.yml` and `p2.yml` are correct pipeline YAML files that could be used as
2141
2133
</div>
2142
2134
</details>
2143
2135
2144
-
2145
2136
## Complete examples {#complete-examples}
2146
2137
2147
2138
This section shows complete pipelines showcasing YAML features.
0 commit comments