Merge pull request #57 from urpylka/master

image_builder: fix pack
This commit is contained in:
Smirnov Artem
2018-07-24 16:33:19 +04:00
committed by GitHub
3 changed files with 8 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ pipeline {
string(name: 'GWBT_REF', defaultValue: "master")
string(name: 'GWBT_URL', defaultValue: "https://github.com/CopterExpress/clever.git")
string(name: 'GWBT_FILE', defaultValue: "")
string(name: 'IMAGE_NAME', defaultValue: "\$(cat ${GWBT_FILE} | jq '.repository.name' -r)_${params.GWBT_REF}_\$(cat ${GWBT_FILE} | jq '.release.published_at' -r).img")
string(name: 'IMAGE_NAME', defaultValue: "\$(cat ${GWBT_FILE} | jq '.repository.name' -r)-${params.GWBT_REF}.img")
string(name: 'GWBT_EVENT', defaultValue: 'release')
booleanParam(name: 'ONLY_PUBLISH', defaultValue: false, description: 'ONLY PUBLISH')
string(name: 'BUILD_DIR', defaultValue: '/mnt/hdd_builder/workspace', description: 'Build workspace')

View File

@@ -96,3 +96,8 @@ echo -e "\033[0;31m\033[1mSize of result image: $endresult (bytes)\033[0m\033[0m
echo "================================================================================"
truncate -s $endresult $strImgFile
echo "================================================================================"
partinfo=`parted -m $strImgFile unit B print`
echo -e "\033[0;31m\033[1mPartition information:\033[0m\033[0m\n$partinfo"
echo "================================================================================"

View File

@@ -317,6 +317,8 @@ publish_image() {
echo -e "\033[0;31m\033[1m$(date) | Zipping complete!\033[0m\033[0m"
else
echo -e "\033[0;31m\033[1m$(date) | Zip-archive already created\033[0m\033[0m"
cd $1 && rm $2.zip && zip $2.zip $2
echo -e "\033[0;31m\033[1m$(date) | Old archive was deleted & create new\033[0m\033[0m"
fi
echo -e "\033[0;31m\033[1m$(date) | Upload image\033[0m\033[0m"