diff --git a/Jenkinsfile b/Jenkinsfile index 0c4de5688..471f3fd59 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -201,39 +201,43 @@ pipeline stage('TEST: ubuntu Doxygen upload') { when { branch "ruben/jenkins_migration"; } - steps + dir('doc_repo') { - checkout scmGit( - branches: [[name: '*/ruben/jenkins_migration']], - extensions: [ - checkoutOption(120), - localBranch("**"), - cloneOption(noTags:false, reference:'', shallow: false, timeout:120) - ], - userRemoteConfigs: [ - [ - credentialsId: 'github_token_as_pwd_2', - url: 'https://github.com/carla-simulator/carla-simulator.github.io.git' - ] - ] - ) - unstash name: 'carla_docs' - withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) { - sh ''' - tar -xvzf carla_doc.tar.gz - git add Doxygen - git commit -m "Updated c++ docs" || true - git push --set-upstream origin ruben/jenkins_migration - ''' - } - } - post - { - always + steps { - deleteDir() + checkout scmGit( + branches: [[name: '*/ruben/jenkins_migration']], + extensions: [ + checkoutOption(120), + localBranch("**"), + cloneOption(noTags:false, reference:'', shallow: false, timeout:120) + ], + userRemoteConfigs: [ + [ + credentialsId: 'github_token_as_pwd_2', + url: 'https://github.com/carla-simulator/carla-simulator.github.io.git' + ] + ] + ) + unstash name: 'carla_docs' + withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) { + sh ''' + tar -xvzf carla_doc.tar.gz + git add Doxygen + git commit -m "Updated c++ docs" || true + git push --set-upstream origin ruben/jenkins_migration + ''' + } + } + post + { + always + { + deleteDir() + } } } + } } post