-
Notifications
You must be signed in to change notification settings - Fork 95
/
microos-stagings.gocd.yaml.erb
90 lines (88 loc) · 3.1 KB
/
microos-stagings.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
---
<% stagings = %w(A B) -%>
format_version: 3
pipelines:
SL-Micro.Stagings.RelPkgs:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: MicroOS
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:
<% stagings.each do |letter| -%>
SL-Micro.Staging.<%= letter %>:
resources:
- repo-checker
tasks:
- script: ./pkglistgen.py -A https://api.suse.de update_and_solve
--staging SUSE:SLFO:Products:SL-Micro:6.1:Staging:<%= letter %>
--only-release-packages --force
<% end -%>
<% stagings.each do |letter| %>
SL-Micro.Staging.<%= letter %>:
environment_variables:
STAGING_PROJECT: SUSE:SLFO:Products:SL-Micro:6.1:Staging:<%= letter %>
STAGING_API: https://api.suse.de
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: MicroOS
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/suse-repos.git
auto_update: true
destination: repos
whitelist:
- SUSE:SLFO:Products:SL-Micro:6.1:Staging:<%= letter %>_-_standard.yaml
scripts:
auto_update: true
git: https://github.com/openSUSE/openSUSE-release-tools.git
whitelist:
- DO_NOT_TRIGGER
destination: scripts
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s pending
./verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
resources:
- repo-checker
tasks:
- script: ./scripts/staging-installcheck.py -A $STAGING_API -p SUSE:SLFO:Products:SL-Micro:6.1 -s $STAGING_PROJECT
- Update.000product:
resources:
- repo-checker
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --staging $STAGING_PROJECT --force; then
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s success
else
./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"
<% end -%>