Setup PC testing in Jenkins (#1984)

* build openpilot docker container in jenkins

* use cache

* run all stages in parallel

* move device tests

* wrap in stages

* it's docker

* doesn't work, but jenkins should cache the image

* steps

* disable phone tests for now

* we're root

* enable everything

* clean up our mess

* skip checkout

* need a plugin for that

* remove that

* parallel

* Revert "parallel"

This reverts commit e3e5af9dc9.

* this is ugly

* Revert "this is ugly"

This reverts commit e839959352.
old-commit-hash: 90d5383354
commatwo_master
Adeeb Shihadeh 5 years ago committed by GitHub
parent 3705a2209f
commit ff65bef323
  1. 61
      Jenkinsfile

61
Jenkinsfile vendored

@ -29,17 +29,52 @@ def phone_steps(String device_type, steps) {
} }
pipeline { pipeline {
agent none
environment {
COMMA_JWT = credentials('athena-test-jwt')
TEST_DIR = "/data/openpilot"
}
stages {
stage('openpilot tests') {
when {
not {
anyOf {
branch 'master-ci'; branch 'devel'; branch 'release2'; branch 'release2-staging'; branch 'dashcam'; branch 'dashcam-staging'
}
}
}
parallel {
stage('PC tests') {
agent {
dockerfile {
filename 'Dockerfile.openpilot'
args '--privileged --shm-size=1G --user=root'
}
}
stages {
stage('Build') {
steps {
sh 'scons -j$(nproc)'
}
}
}
post {
always {
// fix permissions since docker runs as another user
sh "chmod -R 777 ."
}
}
}
stage('On-device Tests') {
agent { agent {
docker { docker {
image 'python:3.7.3' image 'python:3.7.3'
args '--user=root' args '--user=root'
} }
} }
environment {
COMMA_JWT = credentials('athena-test-jwt')
TEST_DIR = "/data/openpilot"
}
stages { stages {
stage('Release Build') { stage('Release Build') {
@ -53,18 +88,7 @@ pipeline {
} }
} }
stage('On-device Tests') { stage('Devel Build') {
when {
not {
anyOf {
branch 'master-ci'; branch 'devel'; branch 'devel-staging'; branch 'release2'; branch 'release2-staging'; branch 'dashcam'; branch 'dashcam-staging'
}
}
}
parallel {
stage('Build') {
environment { environment {
CI_PUSH = "${env.BRANCH_NAME == 'master' ? 'master-ci' : ' '}" CI_PUSH = "${env.BRANCH_NAME == 'master' ? 'master-ci' : ' '}"
} }
@ -97,7 +121,10 @@ pipeline {
} }
} }
} }
} }
} }
}
}

Loading…
Cancel
Save