-
Notifications
You must be signed in to change notification settings - Fork 0
/
fan_out.xml
142 lines (142 loc) · 4.63 KB
/
fan_out.xml
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
138
139
140
141
142
<!-- Modified previous pipeline to show example of Fan out concept -->
<pipelines group="defaultGroup">
<pipeline name="FirstPipeline">
<materials>
<git url="https://github.com/ganeshpachpind/goWorkshop.git" materialName="GOWorkshop" />
</materials>
<stage name="ListFiles">
<jobs>
<job name="List">
<tasks>
<exec command="ls" />
</tasks>
<artifacts>
<artifact src="*" dest="goWorkshop" />
</artifacts>
</job>
</jobs>
</stage>
</pipeline>
<pipeline name="ExecutePython">
<materials>
<pipeline pipelineName="FirstPipeline" stageName="ListFiles" />
</materials>
<stage name="Execute">
<jobs>
<job name="Run">
<tasks>
<fetchartifact pipeline="FirstPipeline" stage="ListFiles" job="List" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>python create_file.python</arg>
<runif status="passed" />
</exec>
</tasks>
<artifacts>
<artifact src="goWorkshop" />
</artifacts>
</job>
</jobs>
</stage>
</pipeline>
<pipeline name="List_AfterFiles">
<materials>
<pipeline pipelineName="ExecutePython" stageName="Execute" />
</materials>
<stage name="List_After">
<jobs>
<job name="List_after_details">
<tasks>
<fetchartifact pipeline="ExecutePython" stage="Execute" job="Run" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>ls</arg>
<runif status="passed" />
</exec>
</tasks>
</job>
</jobs>
</stage>
<stage name="Print_Name_Using_Script">
<jobs>
<job name="Just_Print_NAME">
<environmentvariables>
<variable name="NAME">
<value>Ganesh Pachpind</value>
</variable>
</environmentvariables>
<tasks>
<fetchartifact pipeline="ExecutePython" stage="Execute" job="Run" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>chmod 777 print_name.sh</arg>
<runif status="passed" />
</exec>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>sh print_name.sh</arg>
<runif status="passed" />
</exec>
</tasks>
</job>
</jobs>
</stage>
</pipeline>
<pipeline name="ListAllFiles">
<materials>
<pipeline pipelineName="ExecutePython" stageName="Execute" />
</materials>
<stage name="ListAll">
<jobs>
<job name="ListAll">
<tasks>
<fetchartifact pipeline="ExecutePython" stage="Execute" job="Run" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>ls -la</arg>
<runif status="passed" />
</exec>
</tasks>
</job>
</jobs>
</stage>
<stage name="Sleep">
<jobs>
<job name="Sleep">
<tasks>
<fetchartifact pipeline="ExecutePython" stage="Execute" job="Run" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>sleep 60</arg>
</exec>
</tasks>
</job>
</jobs>
</stage>
<stage name="PrintWorkingDir">
<jobs>
<job name="WorkingDir">
<tasks>
<fetchartifact pipeline="ExecutePython" stage="Execute" job="Run" srcdir="goWorkshop">
<runif status="passed" />
</fetchartifact>
<exec command="/bin/bash" workingdir="goWorkshop">
<arg>-c</arg>
<arg>pwd</arg>
</exec>
</tasks>
</job>
</jobs>
</stage>
</pipeline>
</pipelines>