Add scalability script to Jenkinsfile
This commit is contained in:
parent
2ae7902714
commit
3bef703f24
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
{
|
{
|
||||||
agent none
|
agent none
|
||||||
|
@ -9,13 +11,27 @@ pipeline
|
||||||
|
|
||||||
stages
|
stages
|
||||||
{
|
{
|
||||||
stage('windows and ubuntu in parallel')
|
stage('Creating nodes')
|
||||||
|
{
|
||||||
|
agent { label "master" }
|
||||||
|
steps
|
||||||
|
{
|
||||||
|
script
|
||||||
|
{
|
||||||
|
JOB_ID = "${env.BUILD_TAG}"
|
||||||
|
jenkinsLib = load("/home/jenkins/jenkins.groovy")
|
||||||
|
|
||||||
|
jenkinsLib.CreateBuildNode(JOB_ID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Building CARLA')
|
||||||
{
|
{
|
||||||
parallel
|
parallel
|
||||||
{
|
{
|
||||||
stage('ubuntu')
|
stage('ubuntu')
|
||||||
{
|
{
|
||||||
agent { label 'ubuntu && build' }
|
agent { label "ubuntu && build && ${JOB_ID}" }
|
||||||
environment
|
environment
|
||||||
{
|
{
|
||||||
UE4_ROOT = '/home/jenkins/UnrealEngine_4.22'
|
UE4_ROOT = '/home/jenkins/UnrealEngine_4.22'
|
||||||
|
@ -77,17 +93,32 @@ pipeline
|
||||||
sh 'make package ARGS="--packages=AdditionalMaps --clean-intermediate"'
|
sh 'make package ARGS="--packages=AdditionalMaps --clean-intermediate"'
|
||||||
sh 'make examples ARGS="localhost 3654"'
|
sh 'make examples ARGS="localhost 3654"'
|
||||||
}
|
}
|
||||||
post {
|
post
|
||||||
always {
|
{
|
||||||
|
always
|
||||||
|
{
|
||||||
archiveArtifacts 'Dist/*.tar.gz'
|
archiveArtifacts 'Dist/*.tar.gz'
|
||||||
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
|
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
|
||||||
stash includes: 'Examples/', name: 'ubuntu_examples'
|
stash includes: 'Examples/', name: 'ubuntu_examples'
|
||||||
}
|
}
|
||||||
|
success
|
||||||
|
{
|
||||||
|
node('master')
|
||||||
|
{
|
||||||
|
script
|
||||||
|
{
|
||||||
|
JOB_ID = "${env.BUILD_TAG}"
|
||||||
|
jenkinsLib = load("/home/jenkins/jenkins.groovy")
|
||||||
|
|
||||||
|
jenkinsLib.CreateTestNode(JOB_ID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('ubuntu smoke tests')
|
stage('ubuntu smoke tests')
|
||||||
{
|
{
|
||||||
agent { label 'ubuntu && gpu' }
|
agent { label "ubuntu && gpu && ${JOB_ID}" }
|
||||||
steps
|
steps
|
||||||
{
|
{
|
||||||
unstash name: 'ubuntu_eggs'
|
unstash name: 'ubuntu_eggs'
|
||||||
|
@ -105,6 +136,16 @@ pipeline
|
||||||
archiveArtifacts 'CarlaUE4.log'
|
archiveArtifacts 'CarlaUE4.log'
|
||||||
junit 'Build/test-results/smoke-tests-*.xml'
|
junit 'Build/test-results/smoke-tests-*.xml'
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
node('master')
|
||||||
|
{
|
||||||
|
script
|
||||||
|
{
|
||||||
|
JOB_ID = "${env.BUILD_TAG}"
|
||||||
|
jenkinsLib = load("/home/jenkins/jenkins.groovy")
|
||||||
|
|
||||||
|
jenkinsLib.DeleteTestNode(JOB_ID)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,8 +178,15 @@ pipeline
|
||||||
git push
|
git push
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
post
|
||||||
|
{
|
||||||
|
always
|
||||||
|
{
|
||||||
|
deleteDir()
|
||||||
}
|
}
|
||||||
stage('Cleanning')
|
}
|
||||||
|
}
|
||||||
|
stage('Cleaning')
|
||||||
{
|
{
|
||||||
steps
|
steps
|
||||||
{
|
{
|
||||||
|
@ -149,7 +197,7 @@ pipeline
|
||||||
}
|
}
|
||||||
// stage('windows')
|
// stage('windows')
|
||||||
// {
|
// {
|
||||||
// agent { label 'windows && build' }
|
// agent { label "windows && build && ${JOB_ID}" }
|
||||||
// environment
|
// environment
|
||||||
// {
|
// {
|
||||||
// UE4_ROOT = 'C:\\Program Files\\Epic Games\\UE_4.22'
|
// UE4_ROOT = 'C:\\Program Files\\Epic Games\\UE_4.22'
|
||||||
|
@ -175,8 +223,8 @@ pipeline
|
||||||
// make LibCarla
|
// make LibCarla
|
||||||
// make PythonAPI
|
// make PythonAPI
|
||||||
// make CarlaUE4Editor
|
// make CarlaUE4Editor
|
||||||
|
// """
|
||||||
// // make examples
|
// // make examples
|
||||||
// // """
|
|
||||||
// }
|
// }
|
||||||
// post
|
// post
|
||||||
// {
|
// {
|
||||||
|
@ -208,7 +256,7 @@ pipeline
|
||||||
// bat """
|
// bat """
|
||||||
// call ../setEnv64.bat
|
// call ../setEnv64.bat
|
||||||
// make package
|
// make package
|
||||||
// make package ARGS="--packages=AdditionalMaps --clean-intermediate"
|
// make package ARGS="--packages=AdditionalMaps --clean"
|
||||||
// """
|
// """
|
||||||
// // make examples ARGS="localhost 3654"
|
// // make examples ARGS="localhost 3654"
|
||||||
// }
|
// }
|
||||||
|
@ -235,8 +283,28 @@ pipeline
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
// post
|
||||||
|
// {
|
||||||
|
// always { deleteDir() }
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
post
|
||||||
|
{
|
||||||
|
always
|
||||||
|
{
|
||||||
|
node('master')
|
||||||
|
{
|
||||||
|
script
|
||||||
|
{
|
||||||
|
JOB_ID = "${env.BUILD_TAG}"
|
||||||
|
jenkinsLib = load("/home/jenkins/jenkins.groovy")
|
||||||
|
|
||||||
|
jenkinsLib.DeleteBuildNode(JOB_ID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue