[Jenkinsfile] Fix 'null' doc sub name
All checks were successful
Gitsokyo/bot-base/pipeline/head This commit looks good

This commit is contained in:
Suwako Moriya 2020-04-27 21:03:29 +02:00
parent 036c1ccfe4
commit e469b354a7
Signed by: SuwakoMmh
GPG Key ID: A27482B806F13CD5

10
Jenkinsfile vendored
View File

@ -48,7 +48,7 @@ pipeline {
stage('Deploy Documentation') { stage('Deploy Documentation') {
environment { environment {
TAG_NAME = "${TAG_NAME}" TAG_NAME = """${TAG_NAME ?: ""}"""
} }
when { when {
anyOf { anyOf {
@ -60,13 +60,13 @@ pipeline {
steps { steps {
sh 'rm -f rsync.log' sh 'rm -f rsync.log'
sshagent(credentials: ['1cf72f47-b70c-4f90-a958-020956099d19']) { sshagent(credentials: ['1cf72f47-b70c-4f90-a958-020956099d19']) {
sh 'echo ${TAG_NAME:-GIT_BRANCH#*/}' sh 'echo ${TAG_NAME:-${GIT_BRANCH#*/}}'
sh 'echo ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-GIT_BRANCH#*/}/ >> debug.log' sh 'echo ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-${GIT_BRANCH#*/}}/ >> debug.log'
sh 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes ${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}${TAG_NAME:-GIT_BRANCH#*/}/' sh 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes ${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}${TAG_NAME:-${GIT_BRANCH#*/}}/'
sh '''rsync -aze 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes' \ sh '''rsync -aze 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes' \
--log-file=rsync.log \ --log-file=rsync.log \
--delete \ --delete \
doc/build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-GIT_BRANCH#*/}/''' doc/build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-${GIT_BRANCH#*/}}/'''
} }
} }
post { post {