@@ -10,7 +10,8 @@ pipeline {
1010 environment {
1111 BUILDS_DISCORD = credentials(' build_webhook_url' )
1212 GITHUB_TOKEN = credentials(' 498b4638-2d02-4ce5-832d-8a57d01d97ab' )
13- BUILD_VERSION_ARG = ' LETSENCRYPT_VERSION'
13+ EXT_PIP = ' certbot'
14+ BUILD_VERSION_ARG = ' CERTBOT_VERSION'
1415 LS_USER = ' linuxserver'
1516 LS_REPO = ' docker-letsencrypt'
1617 CONTAINER_NAME = ' letsencrypt'
@@ -91,16 +92,17 @@ pipeline {
9192 /* ########################
9293 External Release Tagging
9394 ######################## */
94- // If this is an os release set release type to none to indicate no external release
95- stage(" Set ENV os " ){
95+ // If this is a pip release set the external tag to the pip version
96+ stage(" Set ENV pip_version " ){
9697 steps{
9798 script{
98- env. EXT_RELEASE = env. PACKAGE_TAG
99- env. RELEASE_LINK = ' none'
99+ env. EXT_RELEASE = sh(
100+ script : ''' curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''' ,
101+ returnStdout : true ). trim()
102+ env. RELEASE_LINK = ' https://pypi.python.org/pypi/' + env. EXT_PIP
100103 }
101104 }
102- }
103- // Sanitize the release tag and strip illegal docker or github characters
105+ } // Sanitize the release tag and strip illegal docker or github characters
104106 stage(" Sanitize tag" ){
105107 steps{
106108 script{
@@ -528,11 +530,11 @@ pipeline {
528530 "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
529531 echo " Pushing New release for Tag"
530532 sh ''' #! /bin/bash
531- echo "Updating base packages to ${PACKAGE_TAG }" > releasebody.json
533+ echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN }" > releasebody.json
532534 echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
533535 "target_commitish": "master",\
534536 "name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
535- "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**OS Changes:**\\ n\\ n' > start
537+ "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**PIP Changes:**\\ n\\ n' > start
536538 printf '","draft": false,"prerelease": false}' >> releasebody.json
537539 paste -d'\\ 0' start releasebody.json > releasebody.json.done
538540 curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
0 commit comments