File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ function _image_build_impl() {
88
88
89
89
source ci-automation/base_sysexts.sh ' local'
90
90
local -n base_sysexts_ref=" ${arch} _base_sysexts"
91
- local base_sysexts_param=$( export IFS=,; echo " ${base_sysexts_ref[*]} " )
91
+ local base_sysexts_param
92
+ base_sysexts_param=$( export IFS=,; echo " ${base_sysexts_ref[*]} " )
92
93
93
94
# build image and related artifacts
94
95
./run_sdk_container -x ./ci-cleanup.sh -n " ${image_container} " -C " ${packages_image} " \
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ function image_changes() (
47
47
" https://github.com/flatcar/flatcar-build-scripts" \
48
48
" ${fbs_repo} "
49
49
if [[ -z " ${BUILDCACHE_SERVER:- } " ]]; then
50
- local BUILDCACHE_SERVER=$( source ci-automation/ci-config.env; echo " ${BUILDCACHE_SERVER} " )
50
+ local BUILDCACHE_SERVER
51
+ BUILDCACHE_SERVER=$( source ci-automation/ci-config.env; echo " ${BUILDCACHE_SERVER} " )
51
52
fi
52
53
local version
53
54
version=$( source sdk_container/.repo/manifests/version.txt; echo " ${FLATCAR_VERSION} " )
@@ -522,14 +523,21 @@ function channel_version() (
522
523
local channel=${1} ; shift
523
524
local board=${1} ; shift
524
525
525
- source <( curl \
526
- -fsSL \
527
- --retry-delay 1 \
528
- --retry 60 \
529
- --retry-connrefused \
530
- --retry-max-time 60 \
531
- --connect-timeout 20 \
532
- " https://${channel} .release.flatcar-linux.net/${board} /current/version.txt" )
526
+ local tmp_version_txt
527
+ tmp_version_txt=$( mktemp)
528
+ # This function runs in a subshell, so we can have our own scoped
529
+ # traps.
530
+ trap ' rm "${tmp_version_txt}"' EXIT
531
+
532
+ curl \
533
+ -fsSL \
534
+ --retry-delay 1 \
535
+ --retry 60 \
536
+ --retry-connrefused \
537
+ --retry-max-time 60 \
538
+ --connect-timeout 20 \
539
+ " https://${channel} .release.flatcar-linux.net/${board} /current/version.txt" > " ${tmp_version_txt} "
540
+ source " ${tmp_version_txt} "
533
541
echo " ${FLATCAR_VERSION} "
534
542
)
535
543
# --
You can’t perform that action at this time.
0 commit comments