-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpipelines.yml
137 lines (133 loc) · 3.42 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
resources:
- name: car_app
type: GitRepo
configuration:
gitProvider: ranjithr_github
path: ranjithrs/carbot
branches:
include: master
- name: my
type: GitRepo
configuration:
gitProvider: ranjithr_github
path: ranjithrs/carbot
branches:
include: master
- name: myFile
type: RemoteFile
configuration:
source: dummyFileServer
- name: build_info_docker_build_push
type: BuildInfo
configuration:
sourceArtifactory: art
buildName: svc_build
buildNumber: 1
pipelines:
- name: dummy_pipeline
configuration:
environmentVariables:
readOnly:
myBranchName: dev
steps:
- name: step_1
type: Bash
execution:
onExecute:
- printenv
- name: simple_pipeline
configuration:
environmentVariables:
readOnly:
myBranchName: dev
steps:
- name: step_1
type: Bash
configuration:
inputResources:
- name: car_app
outputResources:
- name: myFile
execution:
onExecute:
- printenv
- if [ -z $pipeline_var ]; then add_pipeline_variables pipeline_var=1; else echo $pipeline_var; fi
- add_run_variables run_var="hello"
- cd $res_car_app_resourcePath
- echo $myBranchName
- git branch
- git fetch origin $myBranchName && git checkout $myBranchName
- git branch
- name: step_2
type: Bash
configuration:
inputResources:
- name: myFile
runtime:
type: image
image:
auto:
language: java
versions: ['1.0.0']
execution:
onExecute:
- printenv
- if [[ $(($pipeline_var % 2)) -eq 0 ]]; then run_var+=" world"; else run_var+=" universe"; fi
- echo $run_var
- add_pipeline_variables pipeline_var=$((pipeline_var+1))
- name: step_3
type: Bash
configuration:
environmentVariables:
env_var1: "hello"
inputSteps:
- name: step_2
execution:
onExecute:
- add_run_variables step3_var="1"
- echo $env_var1
- name: step_4
type: Bash
configuration:
inputSteps:
- name: step_2
execution:
onExecute:
- add_run_variables step4_var="1"
- name: step_5
type: Bash
configuration:
inputSteps:
- name: step_2
execution:
onExecute:
- echo "step 5"
- name: step_6
type: Bash
configuration:
inputSteps:
- name: step_2
execution:
onExecute:
- echo "step 6"
- name: step_7
type: Bash
configuration:
inputSteps:
- name: step_3
- name: step_4
- name: step_5
- name: step_6
execution:
onExecute:
- echo "step 7"
- name: step_8
type: Bash
configuration:
environmentVariables:
something: $run_number
inputSteps:
- name: step_7
execution:
onExecute:
- echo $something