Skip to content

Commit eb7a28e

Browse files
authored
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
1 parent e9287ef commit eb7a28e

File tree

21 files changed

+813
-489
lines changed

21 files changed

+813
-489
lines changed

docs/docs/reference/pipeline-yaml.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Pipeline YAML reference
33
---
44

5-
# Pipeline YAML
5+
# Pipeline YAML
66

77
This page describes the formal pipeline YAML specification for Semaphore.
88

@@ -43,7 +43,7 @@ Defines the global agent's [`machine` type](#machine) and [`os_image`](#os-image
4343
The `agent` can contain the following properties:
4444

4545
- [`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
4747

4848
```yaml title="Example"
4949
# highlight-next-line
@@ -61,7 +61,7 @@ The default `agent` can be overridden [inside `tasks`](#agent-in-task).
6161

6262
### machine {#machine}
6363

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.
6565

6666
It requires two properties:
6767

@@ -108,7 +108,7 @@ machine:
108108

109109
## containers {#containers}
110110

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.
112112

113113
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.
114114

@@ -252,6 +252,7 @@ agent:
252252
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.
253253

254254
The `execution_time_limit` property accepts one of two options:
255+
255256
- `hours`: time limit expressed in hours. Maximum value is 24
256257
- `minutes`: The time limit is expressed in minutes. The maximum value is 1440
257258

@@ -400,7 +401,7 @@ The following rules apply:
400401

401402
When `scope: project` the queues with the same values for the `name` property in different projects are not queued together.
402403

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.
404405

405406
The `processing` property can have two values:
406407

@@ -428,7 +429,6 @@ Sets a strategy for auto-canceling pipelines in a queue when a new pipeline appe
428429

429430
At least one of them is required. If both are set, `running` will be evaluated first.
430431

431-
432432
### running {#running-in-auto-cancel}
433433

434434
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
801801

802802
:::
803803

804-
805804
### prologue {#prologue-in-task}
806805

807806
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
911910

912911
### secrets {#secrets-in-task}
913912

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.
915914

916915
The `secrets` property is used for importing all the environment variables and files from an existing secret into a Semaphore organization.
917916

@@ -1181,7 +1180,6 @@ The following environment variables are added to each generated job:
11811180
- `SEMAPHORE_JOB_COUNT`: total number of jobs generated via the `parallelism` property
11821181
- `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.
11831182

1184-
11851183
```yaml title="Example"
11861184
version: v1.0
11871185
name: Using the parallelism property
@@ -1201,14 +1199,14 @@ blocks:
12011199
- echo Job $SEMAPHORE_JOB_INDEX out of $SEMAPHORE_JOB_COUNT
12021200
- make test PARTITION=$SEMAPHORE_JOB_INDEX
12031201
```
1202+
12041203
It will automatically create 4 jobs with the following names:
12051204

12061205
- `Parallel job - 1/4`
12071206
- `Parallel job - 2/4`
12081207
- `Parallel job - 3/4`
12091208
- `Parallel job - 4/4`
12101209

1211-
12121210
:::note
12131211

12141212
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:
14951493

14961494
All the displayed files are correct pipeline YAML files that could be used as `semaphore.yml` files.
14971495

1498-
14991496
### result {#result-in-promotions}
15001497

15011498
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
17141711
</div>
17151712
</details>
17161713

1717-
17181714
### Pipeline name {#parameter-pipeline-name}
17191715

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`.
17211717

17221718
```yaml title="deploy.yml"
17231719
version: v1.0
@@ -1816,7 +1812,6 @@ blocks:
18161812
commands: ./deploy.sh
18171813
```
18181814

1819-
18201815
### Global config {#parameter-global}
18211816

18221817
You can use parameters in the [global config](#global-job-config) for the pipeline.
@@ -1841,7 +1836,6 @@ global_job_config:
18411836

18421837
The following example shows how to dynamically assign pipelines to [names queues](../using-semaphore/pipelines#named-queues) with parameters.
18431838

1844-
18451839
```yaml title="deploy.yml"
18461840
version: v1.0
18471841
name: Deployment pipeline
@@ -1885,7 +1879,6 @@ blocks:
18851879

18861880
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.
18871881

1888-
18891882
```yaml title="deploy.yml"
18901883
version: v1.0
18911884
name: Deployment pipeline
@@ -2037,7 +2030,6 @@ The `auto_promote_on` property is a list of items that supports three properties
20372030

20382031
For an `auto_promote_on` branch to execute, the return values of all the used properties of that branch must be `true`.
20392032

2040-
20412033
<details>
20422034
<summary>`auto_promote_on` example</summary>
20432035
<div>
@@ -2141,7 +2133,6 @@ Both `p1.yml` and `p2.yml` are correct pipeline YAML files that could be used as
21412133
</div>
21422134
</details>
21432135

2144-
21452136
## Complete examples {#complete-examples}
21462137

21472138
This section shows complete pipelines showcasing YAML features.
@@ -2206,7 +2197,6 @@ blocks:
22062197
<summary>Pipeline using secrets</summary>
22072198
<div>
22082199

2209-
22102200
``` yaml
22112201
version: v1.0
22122202
name: Pipeline configuration with secrets
@@ -2260,7 +2250,6 @@ blocks:
22602250
</div>
22612251
</details>
22622252

2263-
22642253
## See also
22652254

22662255
- [Jobs YAML reference](./jobs-yaml)
@@ -2270,4 +2259,3 @@ blocks:
22702259
- [Agents YAML reference](./agent-yaml)
22712260
- [Notifications YAML reference](./notifications-yaml)
22722261
- [Semaphore Command Line reference](./semaphore-cli)
2273-

0 commit comments

Comments
 (0)