-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch versioning to benefit from upstream release notes
- Loading branch information
Showing
4 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ pipeline { | |
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat') | ||
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') | ||
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') | ||
EXT_GIT_BRANCH = 'master' | ||
EXT_USER = 'yaakapp' | ||
EXT_REPO = 'app' | ||
BUILD_VERSION_ARG = 'YAAK_RELEASE' | ||
LS_USER = 'linuxserver' | ||
LS_REPO = 'docker-yaak' | ||
|
@@ -126,16 +129,23 @@ pipeline { | |
/* ######################## | ||
External Release Tagging | ||
######################## */ | ||
// If this is a custom command to determine version use that command | ||
stage("Set tag custom bash"){ | ||
steps{ | ||
script{ | ||
env.EXT_RELEASE = sh( | ||
script: ''' curl -sX GET "https://api.github.com/repos/yaakapp/app/releases/latest" | jq -r .tag_name | sed 's|^v||' ''', | ||
returnStdout: true).trim() | ||
env.RELEASE_LINK = 'custom_command' | ||
} | ||
} | ||
// If this is a stable github release use the latest endpoint from github to determine the ext tag | ||
stage("Set ENV github_stable"){ | ||
steps{ | ||
script{ | ||
env.EXT_RELEASE = sh( | ||
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', | ||
returnStdout: true).trim() | ||
} | ||
} | ||
} | ||
// If this is a stable or devel github release generate the link for the build message | ||
stage("Set ENV github_link"){ | ||
steps{ | ||
script{ | ||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE | ||
} | ||
} | ||
} | ||
// Sanitize the release tag and strip illegal docker or github characters | ||
stage("Sanitize tag"){ | ||
|
@@ -870,11 +880,11 @@ pipeline { | |
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' ''' | ||
echo "Pushing New release for Tag" | ||
sh '''#! /bin/bash | ||
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json | ||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json | ||
echo '{"tag_name":"'${META_TAG}'",\ | ||
"target_commitish": "main",\ | ||
"name": "'${META_TAG}'",\ | ||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start | ||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**'${EXT_REPO}' Changes:**\\n\\n' > start | ||
printf '","draft": false,"prerelease": false}' >> releasebody.json | ||
paste -d'\\0' start releasebody.json > releasebody.json.done | ||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters