osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/44055?usp=email )

Change subject: jobs/master-build: pull images before using them
......................................................................

jobs/master-build: pull images before using them

Related: OS#7117
Change-Id: Ic93f3b8c440c8ab15d5eda28ccc06e0873a48d5b
---
M jobs/master-builds.yml
1 file changed, 61 insertions(+), 17 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 7b66289..a54d93d 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -80,15 +80,18 @@
               -e CCACHE_DIR="/ccache" \
               -e 
PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 \
               -v "$CCACHE_DIR:/ccache" \
-    docker_img: '$USER/debian-trixie-build'
-    docker_img_erlang: '$USER/debian-bookworm-erlang'
+    docker_img: 'registry.osmocom.org/osmocom-build/debian-trixie-build'
+    docker_img_bookworm: 
'registry.osmocom.org/osmocom-build/debian-bookworm-build'
+    docker_img_erlang: 
'registry.osmocom.org/osmocom-build/debian-bookworm-erlang'
     docker_img_android: 
'registry.osmocom.org/osmocom-build/debian-bookworm-android'
     docker_img_aram_applet: 
'registry.osmocom.org/osmocom-build/debian-bookworm-aram-applet'
     docker_img_rp2040: 
'registry.osmocom.org/osmocom-build/debian-bookworm-rp2040'
     docker_img_pysim: 'registry.osmocom.org/osmocom-build/pysim-build'
     timeout_cmd: '/usr/bin/timeout 30m'
     wrapper_cmd: '{timeout_cmd} /osmo-ci/scripts/wrapper_core_bt_on_error.sh'
-    cmd: '{docker_run_ccache} {docker_img} {wrapper_cmd} 
/build/contrib/jenkins.sh'
+    cmd: |
+      docker pull {docker_img}
+      {docker_run_ccache} {docker_img} {wrapper_cmd} /build/contrib/jenkins.sh
     trigger:
     email: [email protected] [email protected]
     gerrit_url: 'https://gerrit.osmocom.org'
@@ -155,6 +158,7 @@
       - libosmo-dsp:
           repos_url: '{gitea_url}/sdr/{repos}'
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               {docker_img} {wrapper_cmd} sh -ex -c \
                 'autoreconf -fi; \
@@ -204,6 +208,7 @@
             (WITH_TCAP == "1" && WITH_MANUALS == "1") ||
             (WITH_TCAP == "0" && WITH_MANUALS == "0")
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               -e WITH_TCAP="$WITH_TCAP" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -226,7 +231,9 @@
           a1_name: arch
           a1: !!python/tuple [arm-none-eabi, amd64]
           combination_filter: '!(arch=="arm-none-eabi" && 
label=="FreeBSD_amd64")'
-          cmd: '{docker_run_ccache} {docker_img} {wrapper_cmd} 
/build/contrib/jenkins_arch.sh "$arch"'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run_ccache} {docker_img} {wrapper_cmd} 
/build/contrib/jenkins_arch.sh "$arch"
           # Full triggers would be:
           # trigger: >
           #   master-libosmo-netif, master-libosmo-abis, 
master-libosmo-sigtran,
@@ -281,7 +288,9 @@
           trigger: master-osmo-trx

       - onomondo-eim:
-          cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh'
+          cmd: |
+            docker pull {docker_img_erlang}
+            {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh
           wipe: true

       - onomondo-ipa:
@@ -318,6 +327,7 @@
               SETARCH_CMD="setarch linux32"
               ;;
             esac
+            docker pull "$DOCKER_IMG"
             {docker_run_ccache} \
               -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -325,7 +335,9 @@

       - osmo_dia2gsup:
           repos_url: '{gerrit_url}/erlang/{repos}'
-          cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh'
+          cmd: |
+            docker pull {docker_img_erlang}
+            {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh

       - osmo-epdg:
           repos_url: '{gerrit_url}/erlang/{repos}'
@@ -334,9 +346,11 @@
           cmd: |
             case "$JOB_TYPE" in
             build)
+              docker pull {docker_img_erlang}
               {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh
               ;;
             manuals)
+              docker pull {docker_img}
               {docker_run} {docker_img} {timeout_cmd} 
/build/contrib/jenkins_manuals.sh
               ;;
             esac
@@ -348,20 +362,26 @@
           cmd: |
             case "$JOB_TYPE" in
             build)
+              docker pull {docker_img_erlang}
               {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh
               ;;
             manuals)
+              docker pull {docker_img}
               {docker_run} {docker_img} {timeout_cmd} 
/build/contrib/jenkins_manuals.sh
               ;;
             esac

       - logger_gsmtap:
           repos_url: '{gerrit_url}/erlang/{repos}'
-          cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh'
+          cmd: |
+            docker pull {docker_img_erlang}
+            {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh

       - enftables:
           repos_url: '{gitea_url}/erlang/{repos}'
-          cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh'
+          cmd: |
+            docker pull {docker_img_erlang}
+            {docker_run} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh

       - osmo-e1-hardware:
           a2_name: JOB_TYPE
@@ -371,9 +391,9 @@
             case "$JOB_TYPE" in
             firmware|gateware)
               DOCKER_IMG="registry.osmocom.org/$USER/fpga-build"
-              docker pull "$DOCKER_IMG"
               ;;
             esac
+            docker pull "$DOCKER_IMG"
             {docker_run} \
               -e JOB_TYPE="$JOB_TYPE" \
               "$DOCKER_IMG" \
@@ -384,14 +404,18 @@
       - ice40-usbtrace:
           repos_url: '{gitea_url}/electronics/{repos}'
           docker_img: 'registry.osmocom.org/$USER/fpga-build'
-          cmd: 'docker pull {docker_img} && {docker_run} {docker_img} 
{timeout_cmd} /build/contrib/jenkins.sh --publish'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh 
--publish
           ssh:
             - binaries_ftp.osmocom.org
             - docs_ftp.osmocom.org
       - no2bootloader:
           repos_url: 'https://github.com/no2fpga/{repos}'
           docker_img: 'registry.osmocom.org/$USER/fpga-build'
-          cmd: 'docker pull {docker_img} && {docker_run} {docker_img} 
{timeout_cmd} /build/contrib/jenkins.sh --publish'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh 
--publish
           email: [email protected] [email protected] 
[email protected] [email protected]
           ssh:
             - binaries_ftp.osmocom.org
@@ -409,6 +433,7 @@
             (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") ||
             (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1")
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               -e GTP="$GTP" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -425,10 +450,14 @@

       - osmo_gsup:
           repos_url: '{gerrit_url}/erlang/{repos}'
-          cmd: '{docker_run_ccache} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh'
+          cmd: |
+            docker pull {docker_img_erlang}
+            {docker_run_ccache} {docker_img_erlang} {timeout_cmd} 
/build/contrib/jenkins.sh

       - osmo-gsm-tester:
-          cmd: '{docker_run} {docker_img} {timeout_cmd} 
/build/contrib/jenkins-build-manuals.sh'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run} {docker_img} {timeout_cmd} 
/build/contrib/jenkins-build-manuals.sh

       - osmo-hlr

@@ -459,6 +488,7 @@
             (IU == "--enable-iu" && WITH_MANUALS == "1") ||
             (IU == "--disable-iu" && WITH_MANUALS == "0")
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               -e IU="$IU" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -491,6 +521,7 @@
               SETARCH_CMD="setarch linux32"
               ;;
             esac
+            docker pull "$DOCKER_IMG"
             {docker_run_ccache} \
               -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \
               -e with_vty="$with_vty" \
@@ -503,7 +534,9 @@

       - ot290-gsmtap:
           repos_url: '{gitea_url}/phone-side/{repos}'
-          cmd: '{docker_run_ccache} {docker_img} {wrapper_cmd} make -C 
/build/src'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run_ccache} {docker_img} {wrapper_cmd} make -C /build/src

       - pyosmocom:
           repos_url: '{gerrit_url}/python/{repos}'
@@ -522,6 +555,7 @@
               {timeout_cmd} ./contrib/jenkins.sh
               ;;
             *)
+              docker pull {docker_img_pysim}
               {docker_run} \
                 -e JOB_TYPE="$JOB_TYPE" \
                 {docker_img_pysim} \
@@ -538,6 +572,7 @@
             (IU == "--enable-iu" && WITH_MANUALS == "1") ||
             (IU == "--disable-iu" && WITH_MANUALS == "0")
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               -e IU="$IU" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -569,6 +604,7 @@
               SETARCH_CMD="setarch linux32"
               ;;
             esac
+            docker pull "$DOCKER_IMG"
             {docker_run_ccache} \
               -e INSTR="$INSTR" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -582,13 +618,17 @@
       - osmo-sysmon
       - osmo-remsim
       - osmo-asf4-dfu:
-          cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} 
/build/contrib/jenkins.sh --publish'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run_ccache} {docker_img} {timeout_cmd} 
/build/contrib/jenkins.sh --publish
           email: [email protected] [email protected] 
[email protected]
           ssh:
             - binaries_ftp.osmocom.org
             - docs_ftp.osmocom.org
       - osmo-ccid-firmware:
-          cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} 
/build/contrib/jenkins.sh --publish'
+          cmd: |
+            docker pull {docker_img}
+            {docker_run_ccache} {docker_img} {timeout_cmd} 
/build/contrib/jenkins.sh --publish
           email: [email protected] [email protected] 
[email protected]
           ssh:
             - binaries_ftp.osmocom.org
@@ -613,7 +653,9 @@
       - osmo-opencm3-projects:
           repos_url: '{gitea_url}/electronics/{repos}'
           # bookworm: OS#6859
-          cmd: '{docker_run} $USER/debian-bookworm-build {wrapper_cmd} 
/build/contrib/jenkins.sh --publish'
+          cmd: |
+            docker pull {docker_img_bookworm}
+            {docker_run} {docker_img_bookworm} {wrapper_cmd} 
/build/contrib/jenkins.sh --publish
           email: [email protected] [email protected] 
[email protected]
           ssh:
             - binaries_ftp.osmocom.org
@@ -640,6 +682,7 @@
             (PFCP == "1" && WITH_MANUALS == "1" && NFTABLES == "1") ||
             (PFCP == "0" && WITH_MANUALS == "0" && NFTABLES == "0")
           cmd: |
+            docker pull {docker_img}
             {docker_run_ccache} \
               -e PFCP="$PFCP" \
               -e WITH_MANUALS="$WITH_MANUALS" \
@@ -696,6 +739,7 @@
           cmd: |
             rm -rf osmo-ci
             git clone --depth=1 https://gerrit.osmocom.org/osmo-ci -b master
+            docker pull {docker_img}
             {docker_run_ccache} {docker_img} {wrapper_cmd} 
/build/osmo-ci/scripts/xgoldmon-jenkins.sh

     jobs:

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/44055?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ic93f3b8c440c8ab15d5eda28ccc06e0873a48d5b
Gerrit-Change-Number: 44055
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to