forked from aws-deadline/deadline-cloud-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
59 lines (51 loc) · 1.69 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
specificationVersion: 'jobtemplate-2023-09'
name: Job sample with environment variables
description: |
A job template can set environment variables for the whole job or for a particular step
by specifying Open Job Description environments.
parameterDefinitions:
- name: ExampleParam
type: STRING
default: An example parameter value
jobEnvironments:
- name: JobEnv
description: Job environments apply to everything in the job.
variables:
# When applications have options as environment variables, you can set them here.
JOB_VERBOSITY: MEDIUM
# You can use the value of job parameters when setting environment variables.
JOB_EXAMPLE_PARAM: "{{Param.ExampleParam}}"
# Some more ideas.
JOB_PROJECT_ID: project-12
JOB_ENDPOINT_URL: https://internal-host-name/some/path
# This variable lets applications using the Qt Framework run without a display
QT_QPA_PLATFORM: offscreen
steps:
- name: EnvSampleStep
stepEnvironments:
- name: StepEnv
description: Step environments apply to all the tasks in the step.
variables:
# These environment variables are only set within this step, not other steps.
STEP_VERBOSITY: HIGH
# Replace a variable value defined at the job level.
JOB_PROJECT_ID: step-project-12
script:
actions:
onRun:
command: bash
args:
- '{{Task.File.Run}}'
embeddedFiles:
- name: Run
type: TEXT
data: |
echo Running the task
echo ""
echo Environment variables starting with JOB_*:
set | grep ^JOB_
echo ""
echo Environment variables starting with STEP_*:
set | grep ^STEP_
echo ""
echo Done running the task