Skip to content

Commit 9b5f5d2

Browse files
committed
jenkins_build.sh: publish explicitly named balena-raw and balena-flasher images
At this moment we are providing a single balena.img file that is either raw or flasher based on the coffee script. We want to publish both for some device types, therefore split the single file into balena-raw.img and balena-flasher.img. Temporarily keep the existing balena.img for backwards compatibility until all coffee scripts are updated and image maker is aware of the split. Change-type: minor Signed-off-by: Michal Toman <michalt@balena.io>
1 parent 4771e4d commit 9b5f5d2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

automation/jenkins_build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ deploy_build () {
8888
# uncompressed, just copy and we're done
8989
cp -v $(readlink --canonicalize "$YOCTO_BUILD_DEPLOY/$_deploy_artifact") "$_deploy_dir/image/balena.img"
9090
if [ -n "$_deploy_flasher_artifact" ]; then
91+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-raw.img"
9192
cp -v $(readlink --canonicalize "$YOCTO_BUILD_DEPLOY/$_deploy_flasher_artifact") "$_deploy_dir/image/balena-flasher.img"
93+
elif [ "$_image" = "resin-image-flasher" ]; then
94+
# backwards compatibility - deployFlasherArtifact is not set and deployArtifact contains flasher
95+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-flasher.img"
96+
else
97+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-raw.img"
9298
fi
9399
return
94100
fi
@@ -107,11 +113,21 @@ deploy_build () {
107113
cp -v $(readlink --canonicalize "$YOCTO_BUILD_DEPLOY/$_deploy_artifact") "$_deploy_dir/image/balena.img"
108114
(cd "$_deploy_dir/image" && zip balena.img.zip balena.img)
109115
if [ -n "$_deploy_flasher_artifact" ]; then
116+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-raw.img"
117+
(cd "$_deploy_dir/image" && zip balena-raw.img.zip balena-raw.img)
110118
cp -v $(readlink --canonicalize "$YOCTO_BUILD_DEPLOY/$_deploy_flasher_artifact") "$_deploy_dir/image/balena-flasher.img"
111119
(cd "$_deploy_dir/image" && zip balena-flasher.img.zip balena-flasher.img)
120+
elif [ "$_image" = "resin-image-flasher" ]; then
121+
# backwards compatibility - deployFlasherArtifact is not set and deployArtifact contains flasher
122+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-flasher.img"
123+
(cd "$_deploy_dir/image" && zip balena-flasher.img.zip balena-flasher.img)
124+
else
125+
cp -v "$_deploy_dir/image/balena.img" "$_deploy_dir/image/balena-raw.img"
126+
(cd "$_deploy_dir/image" && zip balena-raw.img.zip balena-raw.img)
112127
fi
113128
if [ "$_remove_compressed_file" = "true" ]; then
114129
rm -rf $_deploy_dir/image/balena.img
130+
rm -rf $_deploy_dir/image/balena-raw.img
115131
rm -rf $_deploy_dir/image/balena-flasher.img
116132
fi
117133
fi

0 commit comments

Comments
 (0)