aboutsummaryrefslogtreecommitdiffstats
path: root/jobs/osmocom-obs-nhofmeyr.yml
blob: 427dcd289d58b3bc738624c5b2b411fbf388d908 (plain)
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
---
- project:
    name: Osmocom_OBS_nhofmeyr
    jobs:
      - Osmocom_OBS_nhofmeyr_{branch_suffix}
    branch_suffix:
      - dev

- job-template:
    name: 'Osmocom_OBS_nhofmeyr_{branch_suffix}'
    project-type: freestyle
    concurrent: false
    defaults: global
    description: |
      Iterate over Osmocom projects, and update projects from the
      "neels/{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. (created from osmo-ci.git/jobs/osmocom-obs-nhofmeyr.yml
      which was originally a copy of osmocom-obs-rhizomatica.yml)
    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="neels/{branch_suffix}"
          PROJ="home:nhofmeyr:{branch_suffix}"
          VERSION_APPEND="~nhofmeyr.{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: 'neels/{branch_suffix}'
          server-name: gerrit.osmocom.org
    publishers:
      - email:
          notify-every-unstable-build: true
          recipients: 'nhofmeyr@sysmocom.de'