diff --git a/.jenkins/deploy.sh b/.jenkins/deploy.sh index 92bfd7a..c70670e 100644 --- a/.jenkins/deploy.sh +++ b/.jenkins/deploy.sh @@ -7,6 +7,7 @@ sudo docker save -o freefem.tar freefem ## Compress the image echo -e "> Compressing the archive" sudo gzip freefem.tar +sudo chown ci freefem.tar.gz ## Deploy to GitHub releases echo -e "> Deploy to GitHub releases" @@ -22,10 +23,10 @@ CURRENT_VERSION=`curl 'https://api.github.com/repos/'$ORGANIZATION'/'$SOURCE_REP echo 'Current FreeFEM version: '$CURRENT_VERSION # Create the release (keep the upload url) -RELEASE_PARAMETERS=$(printf '{"tag_name": "%s", "target_commitish": "master", "name": "%s", "body": "FreeFEM docker - FreeFEM v%s.", "draft": false, "prerelease": false}' $CURRENT_VERSION $CURRENT_VERSION $CURRENT_VERSION) +RELEASE_PARAMETERS=$(printf '{"tag_name": "%s", "target_commitish": "master", "name": "%s", "body": "FreeFEM docker - FreeFEM %s.", "draft": false, "prerelease": false}' $CURRENT_VERSION $CURRENT_VERSION $CURRENT_VERSION) RELEASE=`curl -H "Authorization: token $TOKEN" --data "$RELEASE_PARAMETERS" 'https://api.github.com/repos/'$ORGANIZATION'/'$REPOSITORY'/releases'` UPLOAD_URL=`echo $RELEASE | jq -r '.upload_url'` -echo 'Upload URL: '$ASSETS_URL +echo 'Upload URL: '$UPLOAD_URL # Upload asset RESPONSE=`curl --data-binary "@$FILE_NAME" -H "Authorization: token $TOKEN" -H "Content-Type: application/octet-stream" "$UPLOAD_URL=$FILE_NAME"`