diff --git a/automation/jenkins_build.sh b/automation/jenkins_build.sh index 09f751cda..e658db7c0 100755 --- a/automation/jenkins_build.sh +++ b/automation/jenkins_build.sh @@ -113,18 +113,26 @@ ARCHIVE=$(jq --raw-output '.yocto.archive' $DEVICE_TYPE_JSON) mkdir -p $BUILD_DEPLOY_DIR rm -rf $BUILD_DEPLOY_DIR/* # do we have anything there? mv -v $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/$DEPLOY_ARTIFACT) $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT + +if [ -f $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/$DEPLOY_ARTIFACT.bmap) ]; then + mv -v $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/$DEPLOY_ARTIFACT.bmap) $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT.bmap +else + echo "WARNING: No .bmap file found." +fi + if [ "${COMPRESSED}" == 'true' ]; then if [ "${ARCHIVE}" == 'true' ]; then - (cd $BUILD_DEPLOY_DIR && tar --remove-files --use-compress-program pigz --directory=$DEPLOY_ARTIFACT -cvf ${DEPLOY_ARTIFACT}.tar.gz .) + (cd $BUILD_DEPLOY_DIR && tar --remove-files --use-compress-program pigz --directory=$DEPLOY_ARTIFACT -cvf ${DEPLOY_ARTIFACT}.tar.gz .) else - mv $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT $BUILD_DEPLOY_DIR/resin.img + mv $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT $BUILD_DEPLOY_DIR/resin.img (cd $BUILD_DEPLOY_DIR && tar --remove-files --use-compress-program pigz -cvf resin.img.tar.gz resin.img) fi fi + if [ -f $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/resin-image-$MACHINE.resinhup-tar) ]; then - mv -v $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/resin-image-$MACHINE.resinhup-tar) $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar + mv -v $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/resin-image-$MACHINE.resinhup-tar) $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar else - echo "WARNING: No resinhup package found." + echo "WARNING: No resinhup package found." fi mv -v $WORKSPACE/build/tmp/deploy/images/$MACHINE/VERSION $BUILD_DEPLOY_DIR