Skip to content

Commit dccfd63

Browse files
adeebshihadehclaude
andcommitted
remove Dockerfile, use stock python:3.12 image in Jenkins
- Delete custom Dockerfile (was ubuntu:24.04 based) - Use Jenkins agent { docker } with stock python:3.12 image - Remove apt/platform detection from setup.sh (python:3.12 has gcc, git, curl) - Fix deprecated license format in pyproject.toml - Use reuseNode to share workspace, chmod cleanup for root-owned files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2c2f46b commit dccfd63

4 files changed

Lines changed: 16 additions & 68 deletions

File tree

Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

Jenkinsfile

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
def docker_run(String step_label, int timeout_mins, String cmd) {
2-
timeout(time: timeout_mins, unit: 'MINUTES') {
3-
sh script: "docker run --rm --privileged \
4-
--env PYTHONWARNINGS=error \
5-
--volume /dev/bus/usb:/dev/bus/usb \
6-
--volume /var/run/dbus:/var/run/dbus \
7-
--net host \
8-
${env.DOCKER_IMAGE_TAG} \
9-
bash -c 'scons && ${cmd}'", \
10-
label: step_label
11-
}
12-
}
13-
14-
151
def phone(String ip, String step_label, String cmd) {
162
withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) {
173
def ssh_cmd = """
@@ -69,8 +55,6 @@ pipeline {
6955
agent any
7056
environment {
7157
CI = "1"
72-
PYTHONWARNINGS= "error"
73-
DOCKER_IMAGE_TAG = "panda:build-${env.GIT_COMMIT}"
7458

7559
TEST_DIR = "/data/panda"
7660
SOURCE_DIR = "/data/panda_source/"
@@ -86,29 +70,32 @@ pipeline {
8670
lock(resource: "pandas")
8771
}
8872
stages {
89-
stage('Build Docker Image') {
90-
steps {
91-
timeout(time: 20, unit: 'MINUTES') {
92-
script {
93-
dockerImage = docker.build("${env.DOCKER_IMAGE_TAG}", "--build-arg CACHEBUST=${env.GIT_COMMIT} .")
94-
}
73+
stage('jungle tests') {
74+
agent {
75+
docker {
76+
image 'python:3.12'
77+
args '--user=root --privileged --volume /dev/bus/usb:/dev/bus/usb --volume /var/run/dbus:/var/run/dbus --net host'
78+
reuseNode true
9579
}
9680
}
97-
}
98-
stage('jungle tests') {
9981
steps {
100-
script {
82+
timeout(time: 10, unit: 'MINUTES') {
10183
retry (3) {
102-
docker_run("reset hardware", 3, "python3 ./tests/hitl/reset_jungles.py")
84+
sh './setup.sh && . .venv/bin/activate && export PYTHONWARNINGS=error && scons && python3 ./tests/hitl/reset_jungles.py'
10385
}
10486
}
10587
}
88+
post {
89+
always {
90+
sh 'chmod -R 777 . || true'
91+
}
92+
}
10693
}
10794

10895
stage('parallel tests') {
10996
parallel {
11097
stage('test cuatro') {
111-
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
98+
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root'; reuseNode true } }
11299
steps {
113100
phone_steps("panda-cuatro", [
114101
["build", "scons"],
@@ -120,7 +107,7 @@ pipeline {
120107
}
121108

122109
stage('test tres') {
123-
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
110+
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root'; reuseNode true } }
124111
steps {
125112
phone_steps("panda-tres", [
126113
["build", "scons"],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.10"
44
description = "Code powering the comma.ai panda"
55
readme = "README.md"
66
requires-python = ">=3.11,<3.13" # macOS doesn't work with 3.13 due to pycapnp from opendbc
7-
license = {text = "MIT"}
7+
license = "MIT"
88
authors = [{name = "comma.ai"}]
99
classifiers = [
1010
"Natural Language :: English",

setup.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,6 @@ set -e
44
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
cd $DIR
66

7-
PLATFORM=$(uname -s)
8-
9-
echo "installing dependencies"
10-
if [[ $PLATFORM == "Darwin" ]]; then
11-
# pass
12-
:
13-
elif [[ $PLATFORM == "Linux" ]]; then
14-
# for AGNOS since we clear the apt lists
15-
if [[ ! -d /"var/lib/apt/" ]]; then
16-
sudo apt update
17-
fi
18-
19-
sudo apt-get install -y --no-install-recommends \
20-
curl ca-certificates gcc git \
21-
python3-dev
22-
else
23-
echo "WARNING: unsupported platform. skipping apt/brew install."
24-
fi
25-
267
if ! command -v uv &>/dev/null; then
278
echo "'uv' is not installed. Installing 'uv'..."
289
curl -LsSf https://astral.sh/uv/install.sh | sh

0 commit comments

Comments
 (0)