mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
2
image_builder/Jenkinsfile
vendored
2
image_builder/Jenkinsfile
vendored
@@ -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')
|
||||
|
||||
@@ -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 "================================================================================"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user