diff --git a/Jenkinsfile b/Jenkinsfile index c9bca8d..2302cf4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -100,16 +100,16 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a custom json endpoint parse the return to get external tag - stage("Set ENV custom_json"){ - steps{ - script{ - env.EXT_RELEASE = sh( - script: '''curl -s ${JSON_URL} | jq -r ". | ${JSON_PATH}" ''', - returnStdout: true).trim() - env.RELEASE_LINK = env.JSON_URL - } - } + // 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 -sL https://radarr.servarr.com/v1/update/nightly/changes?os=linux | jq -r '.[0].version' ''', + returnStdout: true).trim() + env.RELEASE_LINK = 'custom_command' + } + } } // Sanitize the release tag and strip illegal docker or github characters stage("Sanitize tag"){ @@ -664,7 +664,7 @@ pipeline { "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash - echo "Data change at JSON endpoint ${JSON_URL}" > releasebody.json + echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ "target_commitish": "nightly",\ "name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 16df543..ba78338 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,7 +2,8 @@ # jenkins variables project_name: docker-radarr -external_type: custom_json +external_type: na +custom_version_command: curl -sL https://radarr.servarr.com/v1/update/nightly/changes?os=linux | jq -r '.[0].version' release_type: prerelease release_tag: nightly ls_branch: nightly