Merge pull request #1935 from coolo/add_staging_bot

Move some more pipelines from citest to official repo
This commit is contained in:
Stephan Kulow 2019-03-28 13:24:07 +01:00 committed by GitHub
commit 486d0c405c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 247 additions and 0 deletions

1
gocd/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
yaml-config-plugin-0.9.0.jar

10
gocd/README.md Normal file
View File

@ -0,0 +1,10 @@
How to validate the yaml
========================
For some reason, valid yaml is not supported - the indentation required
is rather wild. But to check the syntax before commit, you can use the
plugin locally
wget https://github.com/tomzo/gocd-yaml-config-plugin/releases/download/0.9.0/yaml-config-plugin-0.9.0.jar
#> java -jar yaml-config-plugin-0.9.0.jar syntax sp1-stagings.gocd.yaml
{"valid":true}

View File

@ -1,3 +1,15 @@
#! /bin/sh
set -e
if ! test -f yaml-config-plugin-0.9.0.jar; then
wget https://github.com/tomzo/gocd-yaml-config-plugin/releases/download/0.9.0/yaml-config-plugin-0.9.0.jar
fi
for file in *.erb; do
erb -T - $file > $(basename $file .erb)
done
for file in *.gocd.yaml; do
java -jar yaml-config-plugin-0.9.0.jar syntax $file
done

144
gocd/staging.bot.gocd.yaml Normal file
View File

@ -0,0 +1,144 @@
format_version: 3
pipelines:
AdiChecker.Factory:
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:Factory:Staging:adi*.yaml
destination: repos
stages:
- Run:
jobs:
Run:
resources:
- repo-checker
tasks:
- script: |-
cd scripts
./staging-installcheck.py -A https://api.opensuse.org -p openSUSE:Factory
SBot.Regular.Factory:
group: Factory.pkglistgen
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:
timeout: 0
resources:
- staging-bot
tasks:
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory rebuild
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory list --supersede
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory adi --by-develproject
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory select --non-interactive --merge --try-strategies
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory unselect --cleanup
- script: osc -A https://api.opensuse.org staging -p openSUSE:Factory repair --cleanup
AdiChecker.Leap.15.1:
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:Leap:15.1:Staging:adi*.yaml
destination: repos
stages:
- Run:
jobs:
Run:
resources:
- repo-checker
tasks:
- script: |-
cd scripts
./staging-installcheck.py -A https://api.opensuse.org -p openSUSE:Leap:15.1
SBot.Regular.Leap.15.1:
group: Leap.15.1.pkglistgen
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:
timeout: 0
resources:
- staging-bot
tasks:
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 rebuild
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 list --supersede
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 adi --by-develproject
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 select --non-interactive --merge --try-strategies
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 unselect --cleanup
- script: osc -A https://api.opensuse.org staging -p openSUSE:Leap:15.1 repair --cleanup
Project.Only:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
jobs:
openSUSE.Factory:
timeout: 0
resources:
- repo-checker
tasks:
- script: /usr/bin/osrt-repo_checker -A https://api.opensuse.org --debug project_only --post-comments openSUSE:Factory
openSUSE.Leap.15.0.Update:
timeout: 0
resources:
- repo-checker
tasks:
- script: /usr/bin/osrt-repo_checker -A https://api.opensuse.org --debug project_only --post-comments openSUSE:Leap:15.0:Update
openSUSE.Leap.42.3.Update:
timeout: 0
resources:
- repo-checker
tasks:
- script: /usr/bin/osrt-repo_checker -A https://api.opensuse.org --debug project_only --post-comments openSUSE:Leap:42.3:Update
openSUSE.Leap.15.1:
timeout: 0
resources:
- repo-checker
tasks:
- script: /usr/bin/osrt-repo_checker -A https://api.opensuse.org --debug project_only --post-comments openSUSE:Leap:15.1

View File

@ -0,0 +1,80 @@
format_version: 3
pipelines:
<% %w(Factory Leap:15.1).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: |-
cd scripts
./staging-installcheck.py -A https://api.opensuse.org -p openSUSE:<%= project %>
SBot.Regular.<%= nickname %>:
group: <%= nickname %>.pkglistgen
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:
timeout: 0
resources:
- staging-bot
tasks:
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> rebuild
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> list --supersede
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> adi --by-develproject
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> select --non-interactive --merge --try-strategies
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> unselect --cleanup
- script: osc -A https://api.opensuse.org staging -p openSUSE:<%= project %> repair --cleanup
<% end -%>
Project.Only:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
jobs:
<% %w(openSUSE:Factory openSUSE:Leap:15.0:Update openSUSE:Leap:42.3:Update openSUSE:Leap:15.1).each do |project| -%>
<%= project.gsub(':', '.') %>:
timeout: 0
resources:
- repo-checker
tasks:
- script: /usr/bin/osrt-repo_checker -A https://api.opensuse.org --debug project_only --post-comments <%= project %>
<% end -%>