Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 9a0a99b

Browse files
authored
Merge pull request #2 from thelamer/master
Switch to releases
2 parents d82d3b6 + 1e65b36 commit 9a0a99b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Jenkinsfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ pipeline {
9494
/* ########################
9595
External Release Tagging
9696
######################## */
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"){
9999
steps{
100100
script{
101101
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' ''',
103103
returnStdout: true).trim()
104104
}
105105
}
106106
}
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"){
109109
steps{
110110
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
112112
}
113113
}
114114
}
@@ -597,7 +597,7 @@ pipeline {
597597
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
598598
echo "Pushing New release for Tag"
599599
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
601601
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
602602
"target_commitish": "master",\
603603
"name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\

jenkins-vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# jenkins variables
44
project_name: docker-kanzi
5-
external_type: github_commit
5+
external_type: github_stable
66
release_type: stable
77
release_tag: latest
88
ls_branch: master

0 commit comments

Comments
 (0)