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() + } + } + } + } + } +}