jenkins updates for new master

This commit is contained in:
Adeeb Shihadeh
2022-12-08 16:14:22 -08:00
parent 93ecd31d3d
commit d375ce6421
2 changed files with 9 additions and 12 deletions

View File

@@ -89,3 +89,9 @@ RUN cd /tmp/openpilot && \
RUN cd /tmp/openpilot && \
pip install --no-cache-dir -r opendbc/requirements.txt && \
pip install --no-cache-dir --upgrade aenum lru-dict pycurl tenacity atomicwrites serial smbus2
# for Jenkins
COPY README.md panda.tar.* /tmp/
RUN mkdir /tmp/openpilot/panda && \
tar -xvf /tmp/panda.tar.gz -C /tmp/openpilot/panda/ || true

15
Jenkinsfile vendored
View File

@@ -2,13 +2,12 @@ def docker_run(String step_label, int timeout_mins, String cmd) {
timeout(time: timeout_mins, unit: 'MINUTES') {
sh script: "docker run --rm --privileged \
--env PARTIAL_TESTS=${env.PARTIAL_TESTS} \
--volume ${WORKSPACE.replace('/var/jenkins_home', '/data/docker/volumes/jenkins_jenkins-data/_data')}:/tmp/openpilot/panda \
--volume /dev/bus/usb:/dev/bus/usb \
--volume /var/run/dbus:/var/run/dbus \
--workdir /tmp/openpilot/panda \
--net host \
${env.DOCKER_IMAGE_TAG} \
bash -c '${cmd}'", \
bash -c 'scons -j8 && ${cmd}'", \
label: step_label
}
}
@@ -32,8 +31,9 @@ pipeline {
stages {
stage('Build Docker Image') {
steps {
timeout(time: 60, unit: 'MINUTES') {
timeout(time: 20, unit: 'MINUTES') {
script {
sh 'git archive -v -o panda.tar.gz --format=tar.gz HEAD'
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}")
}
}
@@ -42,7 +42,6 @@ pipeline {
stage('prep') {
steps {
script {
docker_run("build", 1, "scons -j8")
docker_run("reset hardware", 3, "python ./tests/ci_reset_hw.py")
}
}
@@ -69,14 +68,6 @@ pipeline {
}
}
}
post {
always {
docker_run("git clean", 1, "git clean -xdff")
sh "rm -rf ${WORKSPACE}/* || true"
sh "rm -rf .* || true"
}
}
}
}
}