use custom version command

This commit is contained in:
thelamer
2020-07-25 15:45:49 -07:00
committed by Ryan Kuba
parent a0ab197103
commit 6b3578b999
2 changed files with 13 additions and 12 deletions

22
Jenkinsfile vendored
View File

@@ -100,16 +100,16 @@ pipeline {
/* ######################## /* ########################
External Release Tagging External Release Tagging
######################## */ ######################## */
// If this is a custom json endpoint parse the return to get external tag // If this is a custom command to determine version use that command
stage("Set ENV custom_json"){ stage("Set tag custom bash"){
steps{ steps{
script{ script{
env.EXT_RELEASE = sh( env.EXT_RELEASE = sh(
script: '''curl -s ${JSON_URL} | jq -r ". | ${JSON_PATH}" ''', script: ''' curl -sL https://radarr.servarr.com/v1/update/nightly/changes?os=linux | jq -r '.[0].version' ''',
returnStdout: true).trim() returnStdout: true).trim()
env.RELEASE_LINK = env.JSON_URL env.RELEASE_LINK = 'custom_command'
} }
} }
} }
// Sanitize the release tag and strip illegal docker or github characters // Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){ stage("Sanitize tag"){
@@ -664,7 +664,7 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag" echo "Pushing New release for Tag"
sh '''#! /bin/bash 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}'",\ echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "nightly",\ "target_commitish": "nightly",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ "name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\

View File

@@ -2,7 +2,8 @@
# jenkins variables # jenkins variables
project_name: docker-radarr 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_type: prerelease
release_tag: nightly release_tag: nightly
ls_branch: nightly ls_branch: nightly