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
@@ -44,15 +34,15 @@ options that are applied to the workflow.
44
34
The following table describes the attributes that can be used for a
45
35
step. All attributes are optional with the exception of the `uses` attribute.
46
36
47
-
| Attribute | Description |
48
-
| :--------- | :-------------------- |
49
-
| `uses` | The Docker image that will be executed for that step. For example,<br>`uses: docker://node:10`. See **"Referencing images in a step"** section below formore examples. |
50
-
| `runs` | Specifies the command to run in the docker image. If `runs` is omitted, the<br>command specified in the `Dockerfile`'s `ENTRYPOINT` instruction will execute.<br>Use the `runs` attribute when the `Dockerfile` does not specify an `ENTRYPOINT`<br>or you want to override the `ENTRYPOINT` command. The `runs` attribute does not<br>invoke a shell by default. Using `runs: "echo $VAR"` will not print the value<br>stored in `$VAR`, but will instead print `\"\$VAR.\"`. To use environment<br>variables with the `runs` instruction, you must include a shell to expand<br>the variables, for example: `runs: ["sh", "-c", "echo $VAR"]`. If the value of `runs`<br>refers to a local script, the path is relative to the workspace folder (see [The workspace](#the-workspace) section below)|
51
-
| `args` | The arguments to pass to the command. This is an array of strings. For example,<br> `args: ["--flag", "--arg", "value"]`. If the value of `args`<br>refers to a local script, the path is relative to the workspace folder (see [The workspace](#the-workspace) section below). |
52
-
| `env` | The environment variables to set inside the container's runtime environment. If<br>you need to pass environment variables into a step, make sure it runs a command<br>shell to perform variable substitution. For example, if your `runs` attribute is<br>set to `["sh", "-c"]`, the value of `args` will be passed to `sh -c` and<br>executed in a command shell. Alternatively, if your `Dockerfile` uses an<br>`ENTRYPOINT` to run the same command (`"sh -c"`), `args` will execute in a<br>command shell as well. See [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#entrypoint) for more details. |
53
-
| `secrets` | Specifies the names of the secret variables to set in the runtime environment<br>which the container can access as an environment variable. For example,<br>`secrets: ["SECRET1", "SECRET2"]`. |
54
-
| `id` | Assigns an identifier to the step. By default, steps are asigned a numerid id<br>corresponding to the order of the step in the list, with `1` identifying<br>the first step. |
55
-
| `needs` | Identifies steps that must complete successfully before this step will be<br>invoked. It can be a string or an array of strings. |
37
+
| Attribute | Description |
38
+
| :--------- | :-------------------- |
39
+
| `uses` | **required** The Docker image that will be executed for that step. For example,<br>`uses: docker://node:10`. See **"Referencing images in a step"** section below for<br>more examples. |
40
+
| `id` | **optional** Assigns an identifier to the step. By default, steps are asigned a numerid id<br>corresponding to the order of the step in the list, with `1` identifying<br>the first step. |
41
+
| `runs` | **optional** Specifies the command to run in the docker image. If `runs` is omitted, the<br>command specified in the `Dockerfile`'s `ENTRYPOINT` instruction will execute.<br>Use the `runs` attribute when the `Dockerfile` does not specify an `ENTRYPOINT`<br>or you want to override the `ENTRYPOINT` command. The `runs` attribute does not<br>invoke a shell by default. Using `runs: "echo $VAR"` will not print the value<br>stored in `$VAR`, but will instead print `\"\$VAR.\"`. To use environment<br>variables with the `runs` instruction, you must include a shell to expand<br>the variables, for example: `runs: ["sh", "-c", "echo $VAR"]`. If the value of `runs`<br>refers to a local script, the path is relative to the workspace folder (see [The workspace](#the-workspace) section below)|
42
+
| `args` | **optional** The arguments to pass to the command. This is an array of strings. For example,<br> `args: ["--flag", "--arg", "value"]`. If the value of `args`<br>refers to a local script, the path is relative to the workspace folder (see [The workspace](#the-workspace) section below). Similarly to the `runs` attribute, if an envrionment<br>variable is being referenced, in order for this reference to be valid, a shell must be<br>be invoked (in the `runs` attribute) in order to expand the value of the variable. |
43
+
| `env` | **optional** The environment variables to set inside the container's runtime environment. If<br>you need to pass environment variables into a step, make sure it runs a command<br>shell to perform variable substitution. For example, if your `runs` attribute is<br>set to `["sh", "-c"]`, the value of `args` will be passed to `sh -c` and<br>executed in a command shell. Alternatively, if your `Dockerfile` uses an<br>`ENTRYPOINT` to run the same command (`"sh -c"`), `args` will execute in a<br>command shell as well. See [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#entrypoint) for more details. |
44
+
| `secrets` | **optional** Specifies the names of the secret variables to set in the runtime environment<br>which the container can access as an environment variable. For example,<br>`secrets: ["SECRET1", "SECRET2"]`. |
45
+
| `skip_pull` | **optional** Assume that the given container image already exist and skip pulling it. |
56
46
57
47
### Referencing images in a step
58
48
@@ -157,7 +147,6 @@ For example, let's look at a workflow that writes to a `myfile` in the
157
147
workspace:
158
148
159
149
```yaml
160
-
version: '1'
161
150
steps:
162
151
- uses: docker://alpine:3.9
163
152
args: [touch, ./myfile]
@@ -203,7 +192,6 @@ defines environment variables using the `env` attribute. For example,
203
192
you could set the variables `FIRST`, `MIDDLE`, and `LAST` using this:
204
193
205
194
```yaml
206
-
version: '1'
207
195
steps:
208
196
- uses: "docker://alpine:3.9"
209
197
args: ["sh", "-c", "echo my name is: $FIRST $MIDDLE $LAST"]
@@ -287,7 +275,6 @@ value for the `uses` attribute. This value instructs Popper to execute
287
275
the command or script given in the `runs` attribute. For example:
288
276
289
277
```yaml
290
-
version: '1'
291
278
steps:
292
279
- uses: "sh"
293
280
runs: ["ls", "-la"]
@@ -304,7 +291,6 @@ script specified in the `runs` attribute are NOT executed in a shell.
304
291
If you need a shell, you have to explicitly invoke one, for example:
305
292
306
293
```yaml
307
-
version: '1'
308
294
steps:
309
295
- uses: sh
310
296
runs: [bash, -c, 'sleep 10 && true && exit 0']
@@ -339,7 +325,6 @@ several nodes. You can get started with running Popper workflows through Slurm b
339
325
340
326
Let's consider a workflow `sample.yml` like the one shown below.
0 commit comments