Added auto doc deploy #2
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
@ -53,24 +53,25 @@ pipeline {
|
||||
}
|
||||
}
|
||||
steps {
|
||||
scipt {
|
||||
echo "Hello world"
|
||||
def SUB_PATH = """${sh(
|
||||
returnStdout: true,
|
||||
script: 'echo "${GIT_BRANCH#*/}"'
|
||||
)}""".trim()
|
||||
if (buildingTag()) {
|
||||
SUB_PATH="${env.TAG_NAME}"
|
||||
}
|
||||
}
|
||||
sshagent(credentials: ['1cf72f47-b70c-4f90-a958-020956099d19']) {
|
||||
scipt {
|
||||
def SUB_PATH = """${sh(
|
||||
returnStdout: true,
|
||||
script: 'echo "${GIT_BRANCH#*/}"'
|
||||
)}""".trim()
|
||||
if (buildingTag()) {
|
||||
SUB_PATH="${env.TAG_NAME}"
|
||||
}
|
||||
withEnv(["SUB_PATH=${SUB_PATH}"]) {
|
||||
sh '''cd doc
|
||||
rm -f rsync.log
|
||||
ssh -o StrictHostKeyChecking=no -o BatchMode=yes ${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}${SUB_PATH}/
|
||||
rsync -aze 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes' \
|
||||
--log-file=rsync.log \
|
||||
--delete \
|
||||
./build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${SUB_PATH}/'''
|
||||
}
|
||||
withEnv(["SUB_PATH=${SUB_PATH}"]) {
|
||||
sh '''cd doc
|
||||
rm -f rsync.log
|
||||
ssh -o StrictHostKeyChecking=no -o BatchMode=yes ${DEPLOY_HOST} mkdir -p ${DEPLOY_PATH}${SUB_PATH}/
|
||||
rsync -aze 'ssh -o StrictHostKeyChecking=no -o BatchMode=yes' \
|
||||
--log-file=rsync.log \
|
||||
--delete \
|
||||
./build/html/ ${DEPLOY_HOST}:${DEPLOY_PATH}${SUB_PATH}/'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user