@@ -10,7 +10,6 @@ pipeline {
10
10
BUILD_VERSION_ARG = ' LDAP_VERSION'
11
11
LS_USER = ' linuxserver'
12
12
LS_REPO = ' docker-ldap-auth'
13
- CONTAINER_NAME = ' ldap-auth'
14
13
DOCKERHUB_IMAGE = ' linuxserver/ldap-auth'
15
14
DEV_DOCKERHUB_IMAGE = ' lsiodev/ldap-auth'
16
15
PR_DOCKERHUB_IMAGE = ' lspipepr/ldap-auth'
@@ -91,12 +90,14 @@ pipeline {
91
90
/* ########################
92
91
External Release Tagging
93
92
######################## */
94
- // If this is an os release set release type to none to indicate no external release
95
- stage(" Set ENV os " ){
93
+ // If this is a pip version change set the external release verison and link
94
+ stage(" Set ENV pip_version " ){
96
95
steps{
97
96
script{
98
- env. EXT_RELEASE = env. PACKAGE_TAG
99
- env. RELEASE_LINK = ' none'
97
+ env. EXT_RELEASE = sh(
98
+ script : ''' curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''' ,
99
+ returnStdout : true ). trim()
100
+ env. RELEASE_LINK = ' https://pypi.python.org/pypi/' + env. EXT_PIP
100
101
}
101
102
}
102
103
}
@@ -179,7 +180,7 @@ pipeline {
179
180
when {
180
181
environment name : ' MULTIARCH' , value : ' true'
181
182
}
182
- stages {
183
+ parallel {
183
184
stage(' Build X86' ) {
184
185
steps {
185
186
sh " docker build --no-cache -t ${ IMAGE} :amd64-${ META_TAG} \
@@ -203,7 +204,7 @@ pipeline {
203
204
sh ''' #! /bin/bash
204
205
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
205
206
'''
206
- sh " wget https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static"
207
+ sh " curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static"
207
208
sh " chmod +x qemu-*"
208
209
sh " docker build --no-cache -f Dockerfile.armhf -t ${ IMAGE} :arm32v6-${ META_TAG} \
209
210
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ META_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
@@ -229,7 +230,7 @@ pipeline {
229
230
sh ''' #! /bin/bash
230
231
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
231
232
'''
232
- sh " wget https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static"
233
+ sh " curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static"
233
234
sh " chmod +x qemu-*"
234
235
sh " docker build --no-cache -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
235
236
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ META_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
@@ -378,34 +379,26 @@ pipeline {
378
379
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' '''
379
380
echo " Pushing New release for Tag"
380
381
sh ''' #! /bin/bash
381
- echo "Updating base packages to ${PACKAGE_TAG }" > releasebody.json
382
+ echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE }" > releasebody.json
382
383
echo '{"tag_name":"'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
383
384
"target_commitish": "master",\
384
385
"name": "'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
385
- "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**OS Changes:**\\ n\\ n' > start
386
+ "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**PIP Changes:**\\ n\\ n' > start
386
387
printf '","draft": false,"prerelease": false}' >> releasebody.json
387
388
paste -d'\\ 0' start releasebody.json > releasebody.json.done
388
389
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
389
390
}
390
391
}
391
- // Use helper containers to Render push the current README in master to the DockerHub Repo
392
- stage(' Sync -README' ) {
392
+ // Use helper container to render a readme from remote and commit if different
393
+ stage(' Update -README' ) {
393
394
when {
394
395
branch " master"
396
+ environment name : ' CHANGE_ID' , value : ' '
395
397
expression {
396
- env. LS_RELEASE != env . EXT_RELEASE + ' -pkg- ' + env . PACKAGE_TAG + ' -ls ' + env . LS_TAG_NUMBER
398
+ env. CONTAINER_NAME != null
397
399
}
398
- environment name : ' CHANGE_ID' , value : ' '
399
400
}
400
401
steps {
401
- withCredentials([
402
- [
403
- $class : ' UsernamePasswordMultiBinding' ,
404
- credentialsId : ' 3f9ba4d5-100d-45b0-a3c4-633fd6061207' ,
405
- usernameVariable : ' DOCKERUSER' ,
406
- passwordVariable : ' DOCKERPASS'
407
- ]
408
- ]) {
409
402
sh ''' #! /bin/bash
410
403
TEMPDIR=$(mktemp -d)
411
404
docker pull linuxserver/doc-builder:latest
@@ -418,7 +411,24 @@ pipeline {
418
411
git --git-dir ${TEMPDIR}/${LS_REPO}/.git commit -m 'Bot Updating README from template'
419
412
git --git-dir ${TEMPDIR}/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
420
413
fi
421
- rm -Rf ${TEMPDIR}
414
+ rm -Rf ${TEMPDIR}'''
415
+ }
416
+ }
417
+ // Use helper container to sync the current README on master to the dockerhub endpoint
418
+ stage(' Sync-README' ) {
419
+ when {
420
+ environment name : ' CHANGE_ID' , value : ' '
421
+ }
422
+ steps {
423
+ withCredentials([
424
+ [
425
+ $class : ' UsernamePasswordMultiBinding' ,
426
+ credentialsId : ' 3f9ba4d5-100d-45b0-a3c4-633fd6061207' ,
427
+ usernameVariable : ' DOCKERUSER' ,
428
+ passwordVariable : ' DOCKERPASS'
429
+ ]
430
+ ]) {
431
+ sh ''' #! /bin/bash
422
432
docker pull lsiodev/readme-sync
423
433
docker run --rm=true \
424
434
-e DOCKERHUB_USERNAME=$DOCKERUSER \
0 commit comments