-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipelines.yml
76 lines (73 loc) · 2.87 KB
/
pipelines.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
resources:
- name: app_gitRepo
type: GitRepo
configuration:
path: avishayh/mydemo
gitProvider: mydemogit
- name: firstOutputResource
type: FileSpec
configuration:
sourceArtifactory: artifactory
# pattern: # required, either this or aql
pattern: "example-repo-local/*.txt"
# aql: <string> # required, either this or pattern
# target: # required to upload files
# props: <string> # optional
# recursive: <boolean> # optional
# flat: <boolean> # optional
# excludePatterns: <string> # optional
# archiveEntries: <string> # optional
# buildName: <string> # optional
# buildNumber: <integer> # optional
# sortBy: <string> # optional
# sortOrder: <string> # optional
# limit: <integer> # optional
# offset: <integer> # optional
- name: my_build_info
type: BuildInfo
configuration:
sourceArtifactory: artifactory
buildName: undefined
buildNumber: -1
pipelines:
- name: my_first_pipeline
steps:
- name: p1_s1
type: Bash
configuration:
inputResources:
- name: app_gitRepo
outputResources:
- name: my_build_info
execution:
onExecute:
# Data from input resources is available as env variables in the step
- echo $res_app_gitRepo_commitSha
# The next two commands add variables to run state, which is available to all downstream steps in this run
# Run state documentation: https://www.jfrog.com/confluence/display/JFROG/Creating+Stateful+Pipelines#CreatingStatefulPipelines-RunState
- add_run_variables current_runid=$run_id
- add_run_variables commitSha=$res_app_gitRepo_commitSha
# This variable is written to pipeline state in p1_s3.
# So this will be empty during first run and will be set to prior run number in subsequent runs
# Pipeline state documentation: https://www.jfrog.com/confluence/display/JFROG/Creating+Stateful+Pipelines#CreatingStatefulPipelines-PipelineState
- echo "Previous run ID is $prev_runid"
- env
- name: p1_s2
type: Bash
configuration:
inputSteps:
- name: p1_s1
execution:
onExecute:
- echo going to sleep for 30 secs - please cancel
- sleep 30
- name: p1_s3_timedout
type: Bash
configuration:
inputSteps:
- name: p1_s1
timeoutSeconds: 10
execution:
onExecute:
- echo going to sleep - will timeout shortly
- sleep 20000