From c27aa76faba01b39406425a1b5b4fe0beb51cea3 Mon Sep 17 00:00:00 2001 From: Mathias Fussenegger Date: Mon, 2 Feb 2026 08:25:56 +0100 Subject: [PATCH] Fix CI; Replace GHA with Jenkins job The `docker build --platform linux/arm64` test on GHA was failing at the `tar xf` step with errors like: tar: plugins/functions/plugin-descriptor.properties: Cannot open: Invalid argument The same error couldn't be reproduced on either my local desktop or a Raspberry PI. Either extracting the exact same tarball directly or from within the exact same Docker image with the exact same tar version. Current suspicion is that there's something broken with the fs/docker/qemu installation on the GHA environment. This replaces the github action workflows with a Jenkins job where we have more control over the environment and where the tests pass. --- .github/workflows/main.yml | 44 -------------------- .github/workflows/test.yml | 31 -------------- Jenkinsfile | 84 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/test.yml create mode 100644 Jenkinsfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index fb9bf55a..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: CrateDB Docker images test -on: [push] - -jobs: - multi-arch-build: - runs-on: ubuntu-latest - strategy: - matrix: - arch: [linux/amd64, linux/arm64] - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Update CrateDB docker image version - run: | - python -m pip install --upgrade pip --quiet - pip install -r requirements.txt --quiet - VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) - ./update.py --cratedb-version ${VERSION} > Dockerfile - - - name: Build CrateDB docker image - run: | - docker buildx build \ - --platform ${{ matrix.arch }} \ - --load \ - --file ./Dockerfile . \ - --tag crate/crate:ci_test - - - name: Run Docker official images tests - run: | - git clone https://github.com/docker-library/official-images.git ~/official-images - ~/official-images/test/run.sh crate/crate:ci_test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 4ca9d1ca..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Integration tests -on: - pull_request: ~ - push: - branches: - - master - -jobs: - test: - name: Integration tests - strategy: - matrix: - runner: [ubuntu-latest, ubuntu-24.04-arm] - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Install requirements - run: python -m pip install -r ./requirements.txt - - - name: Generate Dockerfile & run tests - run: | - VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) - ./update.py --cratedb-version ${VERSION} > Dockerfile - PATH_TO_IMAGE=. zope-testrunner --path . -s tests --color diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..6f946bee --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,84 @@ +pipeline { + agent any + stages { + stage("Parallel") { + parallel { + stage("Integration tests x86_64") { + agent { label "x64" } + steps { + sh ''' + uv venv --python 3.10 + uv pip install -r requirements.txt + VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) + ./update.py --cratedb-version ${VERSION} > Dockerfile + '''.stripIndent() + sh 'PATH_TO_IMAGE=. uv run zope-testrunner --path . -s tests --color' + } + } + stage("Integration tests aarch64") { + agent { label "aarch64" } + steps { + sh ''' + uv venv --python 3.10 + uv pip install -r requirements.txt + VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) + ./update.py --cratedb-version ${VERSION} > Dockerfile + '''.stripIndent() + sh 'PATH_TO_IMAGE=. uv run zope-testrunner --path . -s tests --color' + } + } + stage("Docker build & test x86_64") { + agent { label "x64" } + steps { + sh 'git clean -xdff' + checkout scm + sh ''' + uv venv + uv pip install -r requirements.txt + VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) + ./update.py --cratedb-version ${VERSION} > Dockerfile + + docker build \ + --pull \ + --platform linux/amd64 \ + --rm \ + --force-rm \ + --file ./Dockerfile . \ + --tag crate/crate:ci_test + + rm -rf ./official-images + git clone --filter=blob:none https://github.com/docker-library/official-images.git ./official-images + ./official-images/test/run.sh crate/crate:ci_test + '''.stripIndent() + } + } + + stage("Docker build & test aarch64") { + agent { label "aarch64" } + steps { + sh 'git clean -xdff' + checkout scm + sh ''' + uv venv + uv pip install -r requirements.txt + VERSION=$(curl -s https://cratedb.com/versions.json | grep crate_testing | tr -d '" ' | cut -d ":" -f2) + ./update.py --cratedb-version ${VERSION} > Dockerfile + + docker build \ + --pull \ + --platform linux/arm64 \ + --rm \ + --force-rm \ + --file ./Dockerfile . \ + --tag crate/crate:ci_test + + rm -rf ./official-images + git clone --filter=blob:none https://github.com/docker-library/official-images.git ./official-images + ./official-images/test/run.sh crate/crate:ci_test + '''.stripIndent() + } + } + } + } + } +}