Merge branch 'dev' into jose/adjustvehiclebb

This commit is contained in:
Blyron 2024-02-09 11:32:06 +01:00 committed by GitHub
commit 200b138dbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 264 additions and 207 deletions

247
Jenkinsfile vendored
View File

@ -11,17 +11,25 @@ pipeline
stages
{
stage('Building CARLA')
{
parallel
{
//stage('Building CARLA')
//{
//parallel
//{
stage('ubuntu')
{
agent { label "ubuntu" }
agent { label "gpu" }
environment
{
UE4_ROOT = '/home/jenkins/UnrealEngine_4.26'
}
stages
{
stage('prepare environment')
{
parallel
{
stage('generate libs')
{
stages
{
stage('ubuntu setup')
@ -68,6 +76,67 @@ pipeline
}
}
}
}
}
stage('Download additional resources')
{
stages
{
stage('TEST: Checkout Doxygen repo')
{
when { branch "ruben/jenkins_migration"; }
steps
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/ruben/jenkins_migration']],
extensions: [
cleanBeforeCheckout(),
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'
]
]
)
}
}
}
stage('Checkout Doxygen repo')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/master']],
extensions: [
cleanBeforeCheckout(),
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'
]
]
)
}
}
}
stage('ubuntu retrieve content')
{
steps
@ -75,6 +144,12 @@ pipeline
sh './Update.sh'
}
}
}
}
}
}
stage('ubuntu package')
{
steps
@ -89,23 +164,28 @@ pipeline
{
archiveArtifacts 'Dist/*.tar.gz'
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
// stash includes: 'Dist/AdditionalMaps*.tar.gz', name: 'ubuntu_package2'
stash includes: 'Examples/', name: 'ubuntu_examples'
}
}
}
stage('Testing and documentation')
{
parallel
{
stage('Testing')
{
stages
{
stage('ubuntu smoke tests')
{
agent { label "ubuntu && gpu" }
steps
{
unstash name: 'ubuntu_eggs'
unstash name: 'ubuntu_wheels'
unstash name: 'ubuntu_package'
// unstash name: 'ubuntu_package2'
unstash name: 'ubuntu_examples'
sh 'tar -xvzf Dist/CARLA*.tar.gz -C Dist/'
// sh 'tar -xvzf Dist/AdditionalMaps*.tar.gz -C Dist/'
sh 'DISPLAY= ./Dist/CarlaUE4.sh -nullrhi -RenderOffScreen --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
sh 'make smoke_tests ARGS="--xml --python-version=3.8 --target-wheel-platform=manylinux_2_27_x86_64"'
sh 'make run-examples ARGS="localhost 3654"'
@ -116,12 +196,49 @@ pipeline
{
archiveArtifacts 'CarlaUE4.log'
junit 'Build/test-results/smoke-tests-*.xml'
deleteDir()
}
}
}
}
}
stage('Generate documentation')
{
stages
{
stage('ubuntu Doxygen generation')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
}
}
stage('TEST: ubuntu Doxygen generation')
{
when { branch "ruben/jenkins_migration"; }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
}
}
}
}
}
}
/*
stage('Deployment and documentation publishing')
{
parallel
{
stage('Release Deployment')
{
stages
{
stage('TEST: ubuntu deploy sim')
{
when { branch "ruben/jenkins_migration"; }
@ -132,7 +249,6 @@ pipeline
}
}
*/
stage('ubuntu deploy dev')
{
@ -152,18 +268,12 @@ pipeline
sh 'make deploy ARGS="--replace-latest --docker-push"'
}
}
stage('ubuntu Doxygen generation')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
}
}
stage('Publish documentation')
{
stages
{
stage('ubuntu Doxygen upload')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
@ -171,96 +281,43 @@ pipeline
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/master']],
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')])
{
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 master
git push --set-upstream origin ruben/jenkins_migration
'''
}
}
}
}
/*
stage('TEST: ubuntu Doxygen generation')
stage('TEST: ubuntu Doxygen upload')
{
when { branch "ruben/jenkins_migration"; }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
dir('doc_repo')
{
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
'''
}
}
*/
// 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 '''
// pwd
// ls -lh
// 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
{
always
{
deleteDir()
}
}
}
}
}
}
}
@ -371,7 +428,7 @@ pipeline
}
}*/
}
}
//}
//}
}
}