Skip to content

Retire Debian Bullseye packaging builders #2627

Retire Debian Bullseye packaging builders

Retire Debian Bullseye packaging builders #2627

name: Build and publish citus community nightly packages
env:
MAIN_BRANCH: "all-citus"
PACKAGE_CLOUD_REPO_NAME: "citusdata/community-nightlies"
PACKAGE_CLOUD_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_TOKEN }}
PACKAGING_PASSPHRASE: ${{ secrets.PACKAGING_PASSPHRASE }}
PACKAGING_SECRET_KEY: ${{ secrets.PACKAGING_SECRET_KEY }}
DOCKERHUB_USER_NAME: ${{ secrets.DOCKERHUB_USER_NAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
on:
push:
branches:
- "**"
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_package:
name: Build package
# arm64 legs run on native ARM64 runners; amd64 stays on ubuntu-latest.
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform:
- el/8
- debian/bookworm
- debian/trixie
- ubuntu/jammy
- ubuntu/noble
- ubuntu/resolute
# arm64 debs are gated behind the DEB_BUILD_MULTI_ARCH repo variable
# (default OFF -> amd64 only, so the existing pipeline is unchanged).
arch: ${{ fromJSON(vars.DEB_BUILD_MULTI_ARCH == 'true' && '["amd64", "arm64"]' || '["amd64"]') }}
exclude:
# el/8 is an RPM target; arm64 RPM parity is out of scope here.
- platform: el/8
arch: arm64
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}
owner: citusdata
- name: Export App token to environment
run: |
echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
echo "GITHUB_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
# This step is to fetch the images unanonymously to have higher bandwidth
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USER_NAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Clone tools branch
run: git clone -b v0.8.39 --depth=1 https://github.com/citusdata/tools.git tools
- name: Clone build branch
run: git clone -b "${MAIN_BRANCH}" --depth=1 https://github.com/citusdata/packaging.git packaging
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install python requirements
run: python -m pip install -r tools/packaging_automation/requirements.txt
# The arm64 builder/signer images are not published to Docker Hub yet, so
# build them natively in-job. "docker run" prefers a local image, so
# citus_package picks these up automatically; amd64 keeps pulling from Docker Hub.
- name: Build arm64 builder image
if: matrix.arch == 'arm64'
run: |
export TEST=true
export TARGET_PLATFORM="${PLATFORM/\//,}"
./update_image
env:
PLATFORM: ${{ matrix.platform }}
- name: Build arm64 debsigner image
if: matrix.arch == 'arm64'
run: docker build -t citusdata/packaging:debsigner dockerfiles/debsigner
- name: Build packages
run: |
python -m tools.packaging_automation.citus_package \
--gh_token "${GH_TOKEN}" \
--platform "${{ matrix.platform }}" \
--build_type "nightly" \
--secret_key "${PACKAGING_SECRET_KEY}" \
--passphrase "${PACKAGING_PASSPHRASE}" \
--output_dir "$(pwd)/packages/" \
--input_files_dir "$(pwd)/packaging" \
--is_test
- name: Publish packages
run: |
python -m tools.packaging_automation.upload_to_package_cloud \
--platform "${{ matrix.platform }}" \
--package_cloud_api_token "${PACKAGE_CLOUD_API_TOKEN}" \
--repository_name "${PACKAGE_CLOUD_REPO_NAME}" \
--output_file_path "$(pwd)/packages" \
--current_branch "${GITHUB_REF##*/}" \
--main_branch "develop"