aboutsummaryrefslogtreecommitdiffstats
path: root/jobs/gerrit-binpkgs.yml
blob: a6cf44b8ee41d5bf68300c5955d87ea875210788 (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
# This file holds all gerrit verifications for building deb and rpm packages.
# https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/.
# One can simply add a gerrit job by adding project's repository to repos list.

- project:
    name: gerrit-binpkgs
    jobs:
      - 'gerrit-binpkgs'

- job:
    name: 'gerrit-binpkgs'
    project-type: freestyle
    node: osmocom-gerrit
    concurrent: true
    retry-count: 3 # scm checkout
    properties:
      - build-discarder:
          days-to-keep: 30
          num-to-keep: 1000
    description: |
      binary packages job (deb/rpm) of CI for patches sent to
      <a href="https://gerrit.osmocom.org">gerrit</a>
      </br></br>
      Related issue: <a href="https://osmocom.org/issues/2385">OS#2385</a>

    parameters:
      !include: gerrit-verifications-parameters.yaml.inc

    scm:
      - git:
         basedir: '$PROJECT_NAME'
         url: '$GERRIT_REPO_URL'
         credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d
         branches:
           - $GERRIT_BRANCH
         refspec: $GERRIT_REFSPEC
         name:
         choosing-strategy: gerrit
         wipe-workspace: true
         skip-tag: true
         submodule:
           recursive: false

    builders:
      - shell: |-
          # Make obvious which distro we build for, for humans and for parsing
          # by scripts/jenkins-gerrit/comment_generate.py
          set +x
          echo
          echo "Building binary packages for distro: '$DISTRO'"
          echo
          set -x

          # Clone osmo-ci.git
          rm -rf osmo-ci
          git clone \
            --depth=1 \
            --branch="$BRANCH_CI" \
            https://gerrit.osmocom.org/osmo-ci \
            osmo-ci
          git -C osmo-ci log --oneline

          cd "$PROJECT_NAME"
          ../osmo-ci/scripts/obs/gerrit_binpkgs.sh "$DISTRO"

    wrappers:
    - ansicolor:
        colormap: xterm
    - ssh-agent-credentials:
        users:
        - d5eda5e9-b59d-44ba-88d2-43473cb6e42d

# vim: expandtab tabstop=2 shiftwidth=2