-
Notifications
You must be signed in to change notification settings - Fork 95
/
staging.bot.gocd.yaml.erb
62 lines (61 loc) · 2.13 KB
/
staging.bot.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
format_version: 3
pipelines:
<% %w(Factory Factory:NonFree Leap:16.0 Backports:SLE-15-SP7).each do |project| -%>
<% nickname = project.gsub(':', '.') -%>
AdiChecker.<%= nickname %>:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
materials:
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
destination: scripts
repos:
git: git://botmaster.suse.de/opensuse-repos.git
auto_update: true
whitelist:
- openSUSE:<%= project %>:Staging:adi*.yaml
destination: repos
stages:
- Run:
jobs:
Run:
resources:
- repo-checker
tasks:
- script: |-
./scripts/staging-installcheck.py -A https://api.opensuse.org -p openSUSE:<%= project %>
SBot.Regular.<%= nickname %>:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
jobs:
Run:
resources:
- staging-bot
tasks:
- script: |-
set -e
tempdir=$(mktemp -d)
mkdir -p $tempdir/.osc-plugins
ln -s $PWD/osc-staging.py $tempdir/.osc-plugins
ln -s $PWD/osclib $tempdir/.osc-plugins
export HOME=$tempdir
osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> rebuild
osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> list --supersede
osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> adi
osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> unselect --cleanup
osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> repair --cleanup
rm -rf $tempdir
<% end -%>