-
Notifications
You must be signed in to change notification settings - Fork 95
/
pkglistgen_staging.gocd.yaml.erb
147 lines (142 loc) · 5.28 KB
/
pkglistgen_staging.gocd.yaml.erb
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
143
144
145
146
147
format_version: 3
pipelines:
Factory.Stagings.RelPkgs:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Factory
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Generate.Release.Package:
approval: manual
jobs:
<% factory_stagings = %w(A B C D E F G H I J K L M N O Gcc7) -%>
<% factory_stagings.each do |letter| -%>
"Staging.<%= letter %>":
resources:
- repo-checker
tasks:
- script: ./pkglistgen.py -A https://api.opensuse.org update_and_solve
--staging openSUSE:Factory:Staging:<%= letter %>
--only-release-packages --force
<% end -%>
<% factory_stagings.each do |letter| %>
"Factory.Staging.<%= letter %>":
environment_variables:
STAGING_PROJECT: openSUSE:Factory:Staging:<%= letter %>
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Factory
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/opensuse-repos.git
auto_update: true
destination: repos
whitelist:
- openSUSE:Factory:Staging:<%= letter %>_-_standard.yaml
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
auto_update: true
destination: scripts
whitelist:
- DO_NOT_TRIGGER
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=scripts
./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
resources:
- repo-checker
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Factory -s $STAGING_PROJECT
- Update.000product:
resources:
- repo-checker
tasks:
- script: |-
export PYTHONPATH=scripts
if ./scripts/pkglistgen.py --debug -A $STAGING_API update_and_solve --staging $STAGING_PROJECT --force; then
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s success
else
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s failure
exit 1
fi
- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
<% end %>
<% leap_stagings = %w(A B C) -%>
<% leap_stagings.each do |letter| %>
"Leap.Staging.<%= letter %>":
environment_variables:
STAGING_PROJECT: openSUSE:Leap:16.0:Staging:<%= letter %>
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Leap
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/opensuse-repos.git
auto_update: true
destination: repos
whitelist:
- openSUSE:Leap:16.0:Staging:<%= letter %>_-_standard.yaml
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
auto_update: true
destination: scripts
whitelist:
- DO_NOT_TRIGGER
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=scripts
./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
resources:
- repo-checker
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Leap:16.0 -s $STAGING_PROJECT
- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
<% end %>