summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-09-19 12:35:11 +0200
committerOliver Smith <osmith@sysmocom.de>2019-09-23 14:08:59 +0200
commita5fb5484ae20c96ebf3bc1443149c62f834f5e09 (patch)
tree694249d239fa82ddafb4acc7e71a76a5fb52f66a
parent70f8ca71d053c9d4b0207eba0e157f2b6bb03b81 (diff)
gerrit, master builds: add docker_{run,img} vars
Move the common "docker run" invocation and image name into one place, so it is not duplicated over and over. This prepares for changing the image and building all Osmocom projects in docker (follow up patches). Related: OS#3726 Change-Id: If529e6a93bb2227230981ee22f2c75bd0f1f4518
-rw-r--r--jobs/gerrit-verifications.yml113
-rw-r--r--jobs/master-builds.yml117
2 files changed, 57 insertions, 173 deletions
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index c5aae68..0f97c23 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -20,6 +20,23 @@
combination_filter: ''
sequential: false
# most common build invocation
+ docker_run: |
+ ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
+ mkdir -p "$ARTIFACT_STORE"
+ docker run --rm=true \
+ -e ARTIFACT_STORE=/artifact_store \
+ -e ASCIIDOC_WARNINGS_CHECK="1" \
+ -e HOME=/build \
+ -e JOB_NAME="$JOB_NAME" \
+ -e MAKE=make \
+ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
+ -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ -e PATH="$PATH:/build_bin" \
+ -e WITH_MANUALS="1" \
+ -w /build -i -u build \
+ -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+ -v "$ARTIFACT_STORE:/artifact_store" \
+ docker_img: 'osmocom:amd64'
cmd: ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh
repos_url: 'ssh://jenkins@gerrit.osmocom.org:29418/{repos}'
gerrit_project: '{repos}'
@@ -30,16 +47,7 @@
- cellmgr-ng:
concurrent: true
- cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
- -e PATH="$PATH:/build_bin" \
- -w /build -i -u build \
- -v "$PWD:/build" \
- -v "$HOME/bin:/build_bin" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh'
- libasn1c
- libgtpnl
@@ -67,26 +75,11 @@
a3: !!python/tuple [--disable-iu]
concurrent: true
cmd: |
- ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
- mkdir -p "$ARTIFACT_STORE"
- docker run --rm=true \
- -e HOME=/build \
- -e ARTIFACT_STORE=/artifact_store \
- -e JOB_NAME="$JOB_NAME" \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e SMPP="$SMPP" \
-e MGCP="$MGCP" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" \
- -v "$HOME/bin:/build_bin" \
- -v "$ARTIFACT_STORE:/artifact_store" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- openggsn:
a1_name: GTP
@@ -95,18 +88,7 @@
- osmo-bsc:
concurrent: true
- cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh'
- osmo-bts:
a1_name: FIRMWARE_VERSION
@@ -148,18 +130,7 @@
- osmo-mgw:
concurrent: true
- cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh'
- osmo-msc:
a1_name: IU
@@ -171,23 +142,10 @@
(IU == "--enable-iu" && WITH_MANUALS == "0") ||
(IU == "--disable-iu" && WITH_MANUALS == "1")
cmd: |
- ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
- mkdir -p "$ARTIFACT_STORE"
- docker run --rm=true -i \
- -e HOME=/build \
- -e ARTIFACT_STORE=/artifact_store \
- -e JOB_NAME="$JOB_NAME" \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -w /build -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- -v "$ARTIFACT_STORE:/artifact_store" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-pcap
@@ -209,19 +167,12 @@
(with_vty == "True" && with_dsp == "oc2g" && FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0") ||
(with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1")
cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e FIRMWARE_VERSION="$FIRMWARE_VERSION" \
-e with_vty="$with_vty" \
-e with_dsp="$with_dsp" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e PATH="$PATH:/build_bin" \
- -w /build -i -u build \
- -v "$PWD:/build" \
- -v "$HOME/bin:/build_bin" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-python-tests:
repos_url: 'ssh://jenkins@gerrit.osmocom.org:29418/python/{repos}'
@@ -237,18 +188,10 @@
(IU == "--enable-iu" && WITH_MANUALS == "0") ||
(IU == "--disable-iu" && WITH_MANUALS == "1")
cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-sip-connector:
cmd: WITH_MANUALS=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh
diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 9374391..8651337 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -19,6 +19,25 @@
combination_filter: ''
sequential: false
# most common build invocation (PUBLISH=1 is prepended to publish manual PDFs)
+ docker_run: |
+ ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
+ mkdir -p "$ARTIFACT_STORE"
+ docker run --rm=true \
+ -e ARTIFACT_STORE=/artifact_store \
+ -e ASCIIDOC_WARNINGS_CHECK="1" \
+ -e HOME=/build \
+ -e JOB_NAME="$JOB_NAME" \
+ -e MAKE=make \
+ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
+ -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ -e PATH="$PATH:/build_bin" \
+ -e PUBLISH="1" \
+ -e WITH_MANUALS="1" \
+ -w /build -i -u build \
+ -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+ -v "$ARTIFACT_STORE:/artifact_store" \
+ -v "$HOME/.ssh:/home/build/.ssh:ro" \
+ docker_img: 'osmocom:amd64'
cmd: ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh
wrappers: []
trigger:
@@ -144,45 +163,15 @@
a3: !!python/tuple [--disable-iu]
concurrent: true
cmd: |
- ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
- mkdir -p "$ARTIFACT_STORE"
- docker run --rm=true \
- -e HOME=/build \
- -e ARTIFACT_STORE=/artifact_store \
- -e JOB_NAME="$JOB_NAME" \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e SMPP="$SMPP" \
-e MGCP="$MGCP" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" \
- -v "$HOME/bin:/build_bin" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- -v "$ARTIFACT_STORE:/artifact_store" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-bsc:
concurrent: true
- cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh'
- osmo-bts:
a1_name: FIRMWARE_VERSION
@@ -240,20 +229,7 @@
- osmo-mgw:
concurrent: true
- cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e WITH_MANUALS="1" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh'
trigger: master-osmo-msc, master-osmo-bsc
- osmo-msc:
@@ -266,25 +242,10 @@
(IU == "--enable-iu" && WITH_MANUALS == "0") ||
(IU == "--disable-iu" && WITH_MANUALS == "1")
cmd: |
- ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
- mkdir -p "$ARTIFACT_STORE"
- docker run --rm=true -i \
- -e HOME=/build \
- -e ARTIFACT_STORE=/artifact_store \
- -e JOB_NAME="$JOB_NAME" \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- -v "$ARTIFACT_STORE:/artifact_store" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-pcap
@@ -310,22 +271,12 @@
(with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0") ||
(with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1")
cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e FIRMWARE_VERSION="$FIRMWARE_VERSION" \
-e with_vty="$with_vty" \
-e with_dsp="$with_dsp" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e PATH="$PATH:/build_bin" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" \
- -v "$HOME/bin:/build_bin" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-sgsn:
a1_name: IU
@@ -337,20 +288,10 @@
(IU == "--enable-iu" && WITH_MANUALS == "0") ||
(IU == "--disable-iu" && WITH_MANUALS == "1")
cmd: |
- docker run --rm=true \
- -e HOME=/build \
- -e MAKE=make \
- -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+ {docker_run} \
-e IU="$IU" \
-e WITH_MANUALS="$WITH_MANUALS" \
- -e PATH="$PATH:/build_bin" \
- -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
- -e PUBLISH="1" \
- -e ASCIIDOC_WARNINGS_CHECK="1" \
- -w /build -i -u build \
- -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
- -v "$HOME/.ssh:/home/build/.ssh:ro" \
- osmocom:amd64 /build/contrib/jenkins.sh
+ {docker_img} /build/contrib/jenkins.sh
- osmo-sip-connector:
email: gerrit-log@lists.osmocom.org laforge@gnumonks.org holger@freyther.de