using credentials to push to documentation repo

This commit is contained in:
Ruben Abad 2024-01-29 14:45:53 +01:00
parent e9700ab493
commit ecd2b0255c
1 changed files with 16 additions and 13 deletions

5
Jenkinsfile vendored
View File

@ -170,6 +170,7 @@ pipeline
checkout scmGit(branches: [[name: '*/master']], extensions: [checkoutOption(120), 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']]) checkout scmGit(branches: [[name: '*/master']], extensions: [checkoutOption(120), 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' unstash name: 'carla_docs'
withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) {
sh ''' sh '''
tar -xvzf carla_doc.tar.gz tar -xvzf carla_doc.tar.gz
git add Doxygen git add Doxygen
@ -177,6 +178,7 @@ pipeline
git push git push
''' '''
} }
}
post post
{ {
always always
@ -203,7 +205,7 @@ pipeline
{ {
checkout scmGit(branches: [[name: '*/ruben/jenkins_migration']], extensions: [checkoutOption(120), 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']]) checkout scmGit(branches: [[name: '*/ruben/jenkins_migration']], extensions: [checkoutOption(120), 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' unstash name: 'carla_docs'
withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) {
sh ''' sh '''
tar -xvzf carla_doc.tar.gz tar -xvzf carla_doc.tar.gz
git add Doxygen git add Doxygen
@ -211,6 +213,7 @@ pipeline
git push git push
''' '''
} }
}
post post
{ {
always always