Run builder

This commit is contained in:
TheSpad 2022-02-23 21:53:27 +00:00
parent e219ebb68a
commit f4688d02a6
3 changed files with 13 additions and 7 deletions

View file

@ -18,7 +18,8 @@ jobs:
fi fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_QBITTORRENT_MASTER\". ****" echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_QBITTORRENT_MASTER\". ****"
echo "**** Retrieving external version ****" echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET 'https://api.github.com/repos/qbittorrent/qBittorrent/tags' | jq -r '.[].name' | grep -Po -m 1 '^release-(\d+(\.)?)+$') EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"qbittorrent-nox"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****" echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for qbittorrent branch master" FAILURE_REASON="Can't retrieve external version for qbittorrent branch master"

16
Jenkinsfile vendored
View file

@ -25,6 +25,9 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent' DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent'
PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent' PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent'
DIST_IMAGE = 'alpine' DIST_IMAGE = 'alpine'
DIST_TAG = 'edge'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
DIST_REPO_PACKAGES = 'qbittorrent-nox'
MULTIARCH='true' MULTIARCH='true'
CI='true' CI='true'
CI_WEB='true' CI_WEB='true'
@ -99,14 +102,15 @@ pipeline {
/* ######################## /* ########################
External Release Tagging External Release Tagging
######################## */ ######################## */
// If this is a custom command to determine version use that command // If this is an alpine repo change for external version determine an md5 from the version string
stage("Set tag custom bash"){ stage("Set tag Alpine Repo"){
steps{ steps{
script{ script{
env.EXT_RELEASE = sh( env.EXT_RELEASE = sh(
script: ''' curl -sX GET 'https://api.github.com/repos/qbittorrent/qBittorrent/tags' | jq -r '.[].name' | grep -Po -m 1 '^release-(\\d+(\\.)?)+$' ''', script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''',
returnStdout: true).trim() returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command' env.RELEASE_LINK = 'alpine_repo'
} }
} }
} }
@ -909,11 +913,11 @@ 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 "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${META_TAG}'",\ echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "master",\ "target_commitish": "master",\
"name": "'${META_TAG}'",\ "name": "'${META_TAG}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> releasebody.json printf '","draft": false,"prerelease": false}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

View file

@ -264,6 +264,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **23.02.22:** - Rebase to Alpine Edge, install from Alpine repos.
* **19.02.22:** - Add jq to build-stage * **19.02.22:** - Add jq to build-stage
* **07.01.22:** - Rebase to Alpine, build from source. * **07.01.22:** - Rebase to Alpine, build from source.
* **06.01.22:** - Deprecate unstable branch. * **06.01.22:** - Deprecate unstable branch.