aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-04-05 15:40:08 +0200
committerOliver Smith <osmith@sysmocom.de>2023-04-06 10:59:28 +0200
commitdbd250b46cb6e4d3ad257a82bc75226ccd3ce284 (patch)
treead4f703db28af0c94df3070947b7ab38eef4fe78
parentbdbc48a3728cc9ae2a91474a1cae72b2302ffc2c (diff)
jobs/osmocom-obs-rhizomatica: add new jobs
-rw-r--r--jobs/osmocom-obs-rhizomatica.yml73
1 files changed, 73 insertions, 0 deletions
diff --git a/jobs/osmocom-obs-rhizomatica.yml b/jobs/osmocom-obs-rhizomatica.yml
new file mode 100644
index 0000000..92ab465
--- /dev/null
+++ b/jobs/osmocom-obs-rhizomatica.yml
@@ -0,0 +1,73 @@
+---
+- project:
+ name: Osmocom_OBS_rhizomatica
+ jobs:
+ - Osmocom_OBS_rhizomatica_{branch_suffix}
+ branch_suffix:
+ - testing
+ - production
+
+- job-template:
+ name: 'Osmocom_OBS_rhizomatica_{branch_suffix}'
+ project-type: freestyle
+ concurrent: false
+ defaults: global
+ description: |
+ Iterate over Osmocom projects, and update projects from the
+ "rhizomatica/{branch_suffix}" branch in OBS. If a package exists in OBS
+ for a project, but it doesn't have the git branch anymore then delete the
+ package from OBS (<a href="https://osmocom.org/issues/5981">OS#5981</a>).
+ properties:
+ - build-discarder:
+ days-to-keep: 30
+ num-to-keep: 30
+ node: obs
+ parameters:
+ - string:
+ name: CI_BRANCH
+ description: osmo-ci.git branch
+ default: 'master'
+ builders:
+ - shell: |
+ export PYTHONUNBUFFERED=1
+ BRANCH="rhizomatica/{branch_suffix}"
+ PROJ="rhizomatica:{branch_suffix}"
+ VERSION_APPEND="~rhizomatica.{branch_suffix}"
+ PACKAGE="$GERRIT_PROJECT"
+
+ # When manually triggered, run on all Osmocom packages
+ if [ -z "$PACKAGE" ]; then
+ PACKAGE="ALL_OSMOCOM_PACKAGES"
+ fi
+
+ ./scripts/obs/update_obs_project.py \
+ --apiurl https://obs.osmocom.org \
+ --conflict-pkgname "osmocom-latest" \
+ --delete \
+ --docker \
+ --feed "master" \
+ --git-branch "$BRANCH" \
+ --version-append "$VERSION_APPEND" \
+ "$PROJ" \
+ "$PACKAGE"
+ scm:
+ - git:
+ branches:
+ - '$CI_BRANCH'
+ url: https://gerrit.osmocom.org/osmo-ci
+ git-config-name: 'Jenkins Builder'
+ git-config-email: 'jenkins@osmocom.org'
+ triggers:
+ - gerrit:
+ trigger-on:
+ - ref-updated-event
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '**'
+ branches:
+ - branch-pattern: 'rhizomatica/{branch_suffix}'
+ server-name: gerrit.osmocom.org
+ publishers:
+ - email:
+ notify-every-unstable-build: true
+ recipients: 'jenkins-notifications@lists.osmocom.org'