@@ -74,15 +74,18 @@ function _sdk_bootstrap_impl() {
74
74
75
75
check_version_string " ${version} "
76
76
77
+ if [[ -n ${CIA_DEBUGTESTRUN:- } ]]; then
78
+ set -x
79
+ fi
77
80
# Create new tag in scripts repo w/ updated versionfile.
78
81
# Also push the changes to the branch ONLY IF we're doing a nightly
79
82
# build of the 'main' branch AND we're definitely ON the main branch.
80
83
# This includes intermediate SDKs when doing 2-phase nightly builds.
81
84
local target_branch=' '
82
85
# These variables are here to make it easier to test nightly
83
86
# builds without messing with actual release branches.
84
- local main_branch=' main'
85
- local nightly=' nightly'
87
+ local main_branch=${CIA_DEBUGMAINBRANCH :- main}
88
+ local nightly=${CIA_DEBUGNIGHTLY :- nightly}
86
89
# Patterns used below.
87
90
local nightly_pattern_1=' ^main-[0-9.]+-' " ${nightly} " ' -[-0-9]+(-INTERMEDIATE)?$'
88
91
local nightly_pattern_2=' ^main-[0-9.]+-' " ${nightly} " ' -[-0-9]+$'
@@ -115,9 +118,10 @@ function _sdk_bootstrap_impl() {
115
118
local flatcar_version=" ${versions[1]} "
116
119
local sdk_docker_vernum=" "
117
120
sdk_docker_vernum=$( vernum_to_docker_image_version " ${flatcar_sdk_version} " )
118
- if curl --head --fail --silent --show-error --location " https://${BUILDCACHE_SERVER} /containers/${sdk_docker_vernum} /flatcar-sdk-all-${sdk_docker_vernum} .tar.zst" \
119
- && curl --head --fail --silent --show-error --location " https://${BUILDCACHE_SERVER} /images/amd64/${flatcar_version} /flatcar_production_image.bin.bz2" \
120
- && curl --head --fail --silent --show-error --location " https://${BUILDCACHE_SERVER} /images/arm64/${flatcar_version} /flatcar_production_image.bin.bz2" ; then
121
+ if check_bincache_images_existence \
122
+ " https://${BUILDCACHE_SERVER} /containers/${sdk_docker_vernum} /flatcar-sdk-all-${sdk_docker_vernum} .tar.zst" \
123
+ " https://${BUILDCACHE_SERVER} /images/amd64/${flatcar_version} /flatcar_production_image.bin.bz2" \
124
+ " https://${BUILDCACHE_SERVER} /images/arm64/${flatcar_version} /flatcar_production_image.bin.bz2" ; then
121
125
echo " Stopping build because there are no changes since tag ${existing_tag} , the SDK container tar ball and the Flatcar images exist" >&2
122
126
return 0
123
127
fi
@@ -130,6 +134,9 @@ function _sdk_bootstrap_impl() {
130
134
fi
131
135
fi
132
136
fi
137
+ if [[ -n ${CIA_DEBUGTESTRUN:- } ]]; then
138
+ set +x
139
+ fi
133
140
134
141
local vernum=" ${version#* -} " # remove alpha-,beta-,stable-,lts- version tag
135
142
local git_vernum=" ${vernum} "
@@ -139,7 +146,13 @@ function _sdk_bootstrap_impl() {
139
146
source sdk_lib/sdk_container_common.sh
140
147
create_versionfile " ${vernum} "
141
148
)
149
+ if [[ -n ${CIA_DEBUGTESTRUN:- } ]]; then
150
+ set -x
151
+ fi
142
152
update_and_push_version " ${version} " " ${target_branch} "
153
+ if [[ -n ${CIA_DEBUGTESTRUN:- } ]]; then
154
+ exit 0
155
+ fi
143
156
apply_local_patches
144
157
145
158
./bootstrap_sdk_container -x ./ci-cleanup.sh " ${seed_version} " " ${vernum} "
0 commit comments