From e469b354a7517dd15fed46dafe198f4a1097ff1c Mon Sep 17 00:00:00 2001 From: Suwako Moriya Date: Mon, 27 Apr 2020 21:03:29 +0200 Subject: [PATCH] [Jenkinsfile] Fix 'null' doc sub name --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a49a6a9..aeb8b4d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,7 +48,7 @@ pipeline { stage('Deploy Documentation') { environment { - TAG_NAME = "${TAG_NAME}" + TAG_NAME = """${TAG_NAME ?: ""}""" } when { anyOf { @@ -60,13 +60,13 @@ pipeline { steps { sh 'rm -f rsync.log' sshagent(credentials: ['1cf72f47-b70c-4f90-a958-020956099d19']) { - sh 'echo ${TAG_NAME:-GIT_BRANCH#*/}' - 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 'echo ${TAG_NAME:-${GIT_BRANCH#*/}}' + 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 '''rsync -aze 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes' \ --log-file=rsync.log \ --delete \ - doc/build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-GIT_BRANCH#*/}/''' + doc/build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${TAG_NAME:-${GIT_BRANCH#*/}}/''' } } post {