From d375ce64217a9cc489ae28fac0f8123111c18497 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 8 Dec 2022 16:14:22 -0800 Subject: [PATCH] jenkins updates for new master --- Dockerfile | 6 ++++++ Jenkinsfile | 15 +++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0663b9cd..461e8178 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index 320f5ece..4d850e0b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" - } - } } } }