@@ -94,21 +94,21 @@ pipeline {
94
94
/* ########################
95
95
External Release Tagging
96
96
######################## */
97
- // If this is a github commit trigger determine the current commit at head
98
- stage(" Set ENV github_commit " ){
97
+ // If this is a stable github release use the latest endpoint from github to determine the ext tag
98
+ stage(" Set ENV github_stable " ){
99
99
steps{
100
100
script{
101
101
env. EXT_RELEASE = sh(
102
- script : ''' curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''' ,
102
+ script : ''' curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''' ,
103
103
returnStdout : true ). trim()
104
104
}
105
105
}
106
106
}
107
- // If this is a github commit trigger Set the external release link
108
- stage(" Set ENV commit_link " ){
107
+ // If this is a stable or devel github release generate the link for the build message
108
+ stage(" Set ENV github_link " ){
109
109
steps{
110
110
script{
111
- env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /commit /' + env. EXT_RELEASE
111
+ env. RELEASE_LINK = ' https://github.com/' + env. EXT_USER + ' /' + env. EXT_REPO + ' /releases/tag /' + env. EXT_RELEASE
112
112
}
113
113
}
114
114
}
@@ -597,7 +597,7 @@ pipeline {
597
597
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
598
598
echo " Pushing New release for Tag"
599
599
sh ''' #! /bin/bash
600
- curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message ' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
600
+ curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body ' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
601
601
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
602
602
"target_commitish": "master",\
603
603
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
0 commit comments