Skip to content

Commit d375ce6

Browse files
committed
jenkins updates for new master
1 parent 93ecd31 commit d375ce6

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,9 @@ RUN cd /tmp/openpilot && \
8989
RUN cd /tmp/openpilot && \
9090
pip install --no-cache-dir -r opendbc/requirements.txt && \
9191
pip install --no-cache-dir --upgrade aenum lru-dict pycurl tenacity atomicwrites serial smbus2
92+
93+
94+
# for Jenkins
95+
COPY README.md panda.tar.* /tmp/
96+
RUN mkdir /tmp/openpilot/panda && \
97+
tar -xvf /tmp/panda.tar.gz -C /tmp/openpilot/panda/ || true

Jenkinsfile

+3-12
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ def docker_run(String step_label, int timeout_mins, String cmd) {
22
timeout(time: timeout_mins, unit: 'MINUTES') {
33
sh script: "docker run --rm --privileged \
44
--env PARTIAL_TESTS=${env.PARTIAL_TESTS} \
5-
--volume ${WORKSPACE.replace('/var/jenkins_home', '/data/docker/volumes/jenkins_jenkins-data/_data')}:/tmp/openpilot/panda \
65
--volume /dev/bus/usb:/dev/bus/usb \
76
--volume /var/run/dbus:/var/run/dbus \
87
--workdir /tmp/openpilot/panda \
98
--net host \
109
${env.DOCKER_IMAGE_TAG} \
11-
bash -c '${cmd}'", \
10+
bash -c 'scons -j8 && ${cmd}'", \
1211
label: step_label
1312
}
1413
}
@@ -32,8 +31,9 @@ pipeline {
3231
stages {
3332
stage('Build Docker Image') {
3433
steps {
35-
timeout(time: 60, unit: 'MINUTES') {
34+
timeout(time: 20, unit: 'MINUTES') {
3635
script {
36+
sh 'git archive -v -o panda.tar.gz --format=tar.gz HEAD'
3737
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}")
3838
}
3939
}
@@ -42,7 +42,6 @@ pipeline {
4242
stage('prep') {
4343
steps {
4444
script {
45-
docker_run("build", 1, "scons -j8")
4645
docker_run("reset hardware", 3, "python ./tests/ci_reset_hw.py")
4746
}
4847
}
@@ -69,14 +68,6 @@ pipeline {
6968
}
7069
}
7170
}
72-
73-
post {
74-
always {
75-
docker_run("git clean", 1, "git clean -xdff")
76-
sh "rm -rf ${WORKSPACE}/* || true"
77-
sh "rm -rf .* || true"
78-
}
79-
}
8071
}
8172
}
8273
}

0 commit comments

Comments
 (0)