need to quote yaml for 3.10

This commit is contained in:
thelamer 2019-12-19 14:28:16 -08:00
parent 97f0a7b219
commit 6d766eda82
2 changed files with 15 additions and 15 deletions

28
Jenkinsfile vendored
View file

@ -117,10 +117,10 @@ pipeline {
}
}
}
// If this is a 3.1 build use live docker endpoints
// If this is a 3.10 build use live docker endpoints
stage("Set ENV live build"){
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -141,7 +141,7 @@ pipeline {
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "3.1"}
not {branch "3.10"}
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -214,7 +214,7 @@ pipeline {
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
@ -225,7 +225,7 @@ pipeline {
set -e
TEMPDIR=$(mktemp -d)
docker pull linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=3.1 -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=3.10 -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
@ -233,7 +233,7 @@ pipeline {
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f 3.1
git checkout -f 3.10
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
@ -265,7 +265,7 @@ pipeline {
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
@ -384,7 +384,7 @@ pipeline {
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -412,7 +412,7 @@ pipeline {
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f 3.1
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f 3.10
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
wait
@ -436,7 +436,7 @@ pipeline {
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
@ -450,7 +450,7 @@ pipeline {
// Exit the build if this is just a package check and there are no changes to push
stage('PACKAGECHECK-exit') {
when {
branch "3.1"
branch "3.10"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
@ -638,7 +638,7 @@ pipeline {
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "3.1"
branch "3.10"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
@ -650,14 +650,14 @@ pipeline {
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to 3.1",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to 3.10",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "3.1",\
"target_commitish": "3.10",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": true}' >> releasebody.json

View file

@ -5,7 +5,7 @@ project_name: docker-baseimage-alpine
external_type: os
release_type: prerelease
release_tag: "3.10"
ls_branch: 3.10
ls_branch: "3.10"
repo_vars:
- BUILD_VERSION_ARG = 'OS'
- LS_USER = 'linuxserver'