Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BUILD_ARCHS=["i386", "amd64", "arm64", "armhf"]
BUILD_DISTS=["noble", "jammy", "bookworm", "trixie"]
BUILD_EXCLUDE=[ {"dist":"noble", "arch":"i386"}, {"dist":"jammy", "arch":"i386"} ]
SMOKE_TEST_IMAGES=["ubuntu:jammy", "ubuntu:noble", "debian:bookworm", "debian:trixie"]
7 changes: 0 additions & 7 deletions .github/actions/build-binary-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ inputs:
arch:
description: "Architecture to build for"
required: true
checkout_ref:
description: "Ref to checkout"
required: false
default: ''

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
- name: Determine build architecture
shell: bash
run: |
Expand Down
7 changes: 0 additions & 7 deletions .github/actions/build-source-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@ inputs:
release_tag:
description: "Release tag to build for (value 'unstable' is supported)"
required: false
checkout_ref:
description: "Ref to checkout"
required: false
default: ''

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
- name: Install dependencies
shell: bash
run: |
Expand Down
37 changes: 37 additions & 0 deletions .github/actions/parse-env-file/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Parse env file"
description: "Parses .env environment file and extracts all available fields as outputs"

inputs:
env_file_path:
description: ".env file path"
default: '.github/.env'
required: false

outputs:
BUILD_ARCHS:
description: "The extracted BUILD_DISTS from .env file"
value: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS:
description: "The extracted BUILD_DISTS from .env file"
value: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE:
description: "The extracted BUILD_EXCLUDE from .env file"
value: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES:
description: "The extracted SMOKE_TEST_IMAGES from .env file"
value: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse release handle
id: parse
shell: bash
run: |
cat "${{ inputs.env_file_path }}" | while IFS= read -r line || [[ -n "$line" ]]; do
[[ -z "$line" || "$line" =~ ^# ]] && continue
echo "$line" >> "$GITHUB_OUTPUT"
done
7 changes: 0 additions & 7 deletions .github/actions/run-smoke-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ inputs:
arch:
description: "Architecture to run smoke tests for"
required: true
checkout_ref:
description: "Ref to checkout"
required: false
default: ''

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref || '' }}
- name: Extract distribution from image
id: extract_dist
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ runs:
# For internal release we have an IAM role that we need to assume
- name: Configure aws credentials for internal release
if: ${{ inputs.release_type == 'internal' }}
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v4.3.1
with:
role-to-assume: ${{ inputs.APT_S3_IAM_ARN }}
aws-region: us-east-1
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,29 @@ run-name: >-
}}

jobs:
populate-env-vars:
runs-on: ["ubuntu-latest"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse vars
id: parse
uses: ./.github/actions/parse-env-file
outputs:
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

build-n-test:
uses: ./.github/workflows/build-n-test-all-distros.yml
needs: populate-env-vars
with:
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
# Determine whether we should use special "unstable" release_tag. Assume
# that for unstable branch and for any external call, dispatch or schedule
# we are building unstable release. In other cases it's a regular PR/push
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-n-test-all-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
with:
dist: ${{ matrix.dist }}
release_tag: ${{ inputs.release_tag }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}

build-binary-package:
runs-on: ${{ contains(matrix.arch, 'arm') && 'ubuntu24-arm64-2-8' || 'ubuntu-24.04' }}
Expand Down Expand Up @@ -78,7 +77,6 @@ jobs:
dist: ${{ matrix.dist }}
arch: ${{ matrix.arch }}
run_id: ${{ github.run_id }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}

smoke-test-archs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -115,4 +113,3 @@ jobs:
image: ${{ matrix.image }}
arch: ${{ matrix.arch }}
run_id: ${{ github.run_id }}
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
28 changes: 22 additions & 6 deletions .github/workflows/release_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,31 @@ jobs:
release_version_branch: ${{ steps.ensure-branch.outputs.release_version_branch }}
release_type: ${{ github.event.inputs.release_type }}

populate-env-vars:
runs-on: ["ubuntu-latest"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse vars
id: parse
uses: ./.github/actions/parse-env-file
outputs:
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}

build-n-test:
needs: prepare-release
needs:
- prepare-release
- populate-env-vars
uses: ./.github/workflows/build-n-test-all-distros.yml
with:
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
release_tag: ${{ inputs.release_tag }}

create-release-handle:
Expand Down Expand Up @@ -95,7 +112,6 @@ jobs:
fi
echo "env_name=$env_name" >> $GITHUB_OUTPUT
- name: Send Failure Slack notification
if: failure()
uses: ./.github/actions/slack-notification
with:
slack_func: slack_format_failure_message
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,19 @@ jobs:
with:
release_handle: ${{ github.event.inputs.release_handle }}

- name: Upload staging packages
- name: Upload packages
id: upload
uses: ./.github/actions/upload-packages
with:
run_id: ${{ steps.parse-handle.outputs.run_id }}
release_type: ${{ github.event.inputs.release_type }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
APT_S3_BUCKET: ${{ secrets.APT_S3_BUCKET_STAGING }}
APT_S3_REGION: ${{ secrets.APT_S3_REGION }}
APT_S3_IAM_ARN: ${{ secrets.APT_S3_IAM_ARN_STAGING }}
APT_S3_BUCKET: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_BUCKET || secrets.APT_S3_BUCKET_STAGING }}
APT_S3_IAM_ARN: ${{ github.event.inputs.release_type == 'internal' && secrets.APT_S3_IAM_ARN_STAGING || '' }}
APT_S3_ACCESS_KEY_ID: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_ACCESS_KEY_ID || '' }}
APT_S3_SECRET_ACCESS_KEY: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_SECRET_ACCESS_KEY || '' }}

- name: Merge back to release branch
id: merge-back
Expand Down