@@ -158,13 +158,35 @@ else
158
158
popd > /dev/null 2>&1
159
159
fi
160
160
161
- " ${automation_dir} " /../build/balena-build.sh -d " ${MACHINE} " -s " ${JENKINS_PERSISTENT_WORKDIR} " -a " $( balena_lib_environment) " -v " ${buildFlavor} " -g " ${BARYS_ARGUMENTS_VAR} "
161
+ # Artifacts
162
+
163
+ # Build hostapp
164
+ " ${automation_dir} " /../build/balena-build.sh -d " ${MACHINE} " -s " ${JENKINS_PERSISTENT_WORKDIR} " -a " $( balena_lib_environment) " -v " ${buildFlavor} " -g " ${BARYS_ARGUMENTS_VAR} " -b " -c image_docker" -i " balena-image"
162
165
163
166
image_path=$( find " ${WORKSPACE} /build/tmp/work/" -name " balena-image-${MACHINE} *.docker" -type l)
164
167
if [ -L " ${_image_path} " ]; then
165
168
echo " [ERROR]:balena_deploy_hostapp: No hostapp to release"
166
169
exit 1
167
170
fi
171
+ balena_deploy_block " $( balena_lib_get_slug " ${MACHINE} " ) " " ${MACHINE} " " ${_bootable:- 1} " " ${deploy} " " ${image_path} "
172
+
173
+ # Build and release blocks
174
+ if [ -n " ${blocks} " ]; then
175
+ [ " ${deploy} " = " no" ] && _final=" "
176
+ " ${automation_dir} /jenkins_build-blocks.sh" -d " ${MACHINE} " -a " $( balena_lib_environment) " -b " ${blocks} " -t " $( balena_lib_token) " -v " ${buildFlavor} " -s " ${JENKINS_PERSISTENT_WORKDIR} " " ${_final: +" -p" } "
177
+ fi
178
+
179
+ # Release hostos
180
+ osapp=" ${MACHINE} -hostos"
181
+ blocks_apps=" ${MACHINE} "
182
+ for block in ${blocks} ; do
183
+ blocks_apps=" ${blocks_apps} ${MACHINE} -${block} "
184
+ done
185
+ balena_deploy_hostos " ${osapp} " " ${blocks_apps} " " ${MACHINE} " " ${deploy} "
186
+ BARYS_ARGUMENTS_VAR=" ${BARYS_ARGUMENTS_VAR} -a HOSTOS_APPS=${osapp} "
187
+
188
+ # Build image
189
+ " ${automation_dir} " /../build/balena-build.sh -d " ${MACHINE} " -s " ${JENKINS_PERSISTENT_WORKDIR} " -a " $( balena_lib_environment) " -v " ${buildFlavor} " -g " ${BARYS_ARGUMENTS_VAR} "
168
190
169
191
if [ " $ENABLE_TESTS " = true ]; then
170
192
# Run the test script in the device specific repository
@@ -186,7 +208,6 @@ if [ "$deploy" = "yes" ]; then
186
208
187
209
balena_deploy_to_s3 " $MACHINE " " ${buildFlavor} " " ${ESR} " " ${deployTo} "
188
210
balena_deploy_to_dockerhub " ${MACHINE} "
189
- balena_deploy_block " $( balena_lib_get_slug " ${MACHINE} " ) " " ${MACHINE} " " ${_bootable:- 1} " " ${deploy} " " ${image_path} "
190
211
191
212
if [ " $AMI " = " true" ]; then
192
213
echo " [INFO] Generating AMI"
0 commit comments