Skip to content
Merged
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: 1 addition & 3 deletions .github/workflows/alpine-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
fetch-depth: 0

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: latest/candidate
uses: canonical/setup-lxd@v0.1.2

- name: Create alpine container
# the current shell doesn't have lxd as one of the groups
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,3 @@ jobs:
- name: Run ShellCheck
run: |
shellcheck ./tools/ds-identify

check-cla-signers:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Check CLA signers file
run: tools/check-cla-signers
9 changes: 9 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ jobs:
cat unsigned-cla.txt
exit 1
fi

check-cla-signers:
name: Verify that ./tools/.github-cla-signers is in alphabetical order
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Check CLA signers file
run: tools/check-cla-signers
4 changes: 1 addition & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ jobs:
path: '${{ runner.temp }}/cloud-init*.deb'
retention-days: 3
- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: latest/candidate
uses: canonical/setup-lxd@v0.1.2
- name: Verify deb package
run: |
ls -hal '${{ runner.temp }}'
Expand Down
73 changes: 51 additions & 22 deletions .github/workflows/packaging-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Packaging
# This test runs against packaging PRs and verifies that
# patches apply and unit tests pass.
#
# TODO: add full build-package / sbuild test
name: "Packaging (downstream branch) - patches apply cleanly unit tests pass"

on:
pull_request:
Expand All @@ -13,40 +17,65 @@ defaults:
run:
shell: sh -ex {0}

env:
RELEASE: focal

jobs:
check-patches:
name: Check patches
patch-conflicts-upstream:
runs-on: ubuntu-24.04
name: Check patches apply cleanly and unit tests pass
steps:
- name: Checkout

- name: Setup - checkout branch
uses: actions/checkout@v4
with:
# Fetch all branches for merging
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Prepare dependencies

- name: Setup - install dependencies
run: |
# This stage is slow, and unnecessecary when no series exists, so
# only run it if necessary to save some cycles.
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox quilt
- name: Setup quilt environment
run: |
echo 'QUILT_PATCHES=debian/patches' >> ~/.quiltrc
echo 'QUILT_SERIES=debian/patches/series' >> ~/.quiltrc

- name: Configure git and merge
- name: Setup - Configure quilt
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git merge origin/main
- name: Quilt patches apply successfully and tests run
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
# The quilt default setting is --fuzz=2, but debian packaging has
# stricter requirements
sudo sed -i 's/QUILT_PUSH_ARGS=.*$/QUILT_PUSH_ARGS="--fuzz=0"/g' /etc/quilt.quiltrc
# Standardize patches to use this format. Sorted patches reduce patch size.
sudo sed -i 's/QUILT_REFRESH_ARGS=.*$/QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort"/g' /etc/quilt.quiltrc
# quilt defaults to QUILT_PATCHES=patches, but debian uses debian/patches
sudo sed -i 's|.*QUILT_PATCHES=.*$|QUILT_PATCHES=debian/patches|g' /etc/quilt.quiltrc

- name: Run test - apply patches and run unit tests
run: |
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
quilt push -a
tox -e py3
quilt pop -a
quilt pop -a --refresh
- name: Enforce sorted patches
run: |
# Github Actions doesn't appear to have a simple mechanism for
# early exit without failure
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping"
exit 0
fi
# check for any changes from the refresh above
if [ -n "$(git diff)" ]; then
# if patches were refreshed then they weren't sorted
exit 1
fi
69 changes: 69 additions & 0 deletions .github/workflows/packaging-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This test runs after merging PRs into upstream to notify maintainers when
# a new PR has caused a patch to not apply against the merged branch.
name: "Packaging (main branch) - patches apply cleanly and unit tests pass (after merging)"

on:
push:
branches:
- main

concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

defaults:
run:
shell: bash -ex {0}

jobs:
patch-conflicts-ubuntu:
runs-on: ubuntu-24.04
name: Check patches
steps:

- name: Setup - checkout branches
uses: actions/checkout@v4
with:
# Fetch all history for merging
fetch-depth: 0
ref: main

- name: Setup - install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox quilt

- name: Setup - configure quilt
run: |
# The quilt default setting is --fuzz=2, but debian packaging has
# stricter requirements.
sudo sed -i 's/QUILT_PUSH_ARGS=.*$/QUILT_PUSH_ARGS="--fuzz=0"/g' /etc/quilt.quiltrc
# quilt defaults to QUILT_PATCHES=patches, but debian uses debian/patches
sudo sed -i 's|.*QUILT_PATCHES=.*$|QUILT_PATCHES=debian/patches|g' /etc/quilt.quiltrc

- name: Setup - configure git
run: |
git config user.name "Github Actions"
git config user.email "noreply@github.com"

- name: Run test - apply patches and run unit tests for each series
run: |
# Modify the following line to add / remove ubuntu series
for BRANCH in ubuntu/devel ubuntu/oracular ubuntu/noble ubuntu/jammy ubuntu/focal; do
# merge - this step is not expected to fail
git merge "origin/$BRANCH"
if [ ! -f debian/patches/series ]; then
echo "no patches, skipping $BRANCH"
# undo merge - this step is not expected to fail
git reset --hard origin/main
continue
fi
# did patches apply cleanly?
quilt push -a
# run unit tests
tox -e py3
# a patch didn't un-apply cleanly if this step fails
quilt pop -a
# undo merge - this step is not expected to fail
git reset --hard origin/main
done
6 changes: 0 additions & 6 deletions .pc/applied-patches
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ deprecation-version-boundary.patch
no-single-process.patch
no-nocloud-network.patch
grub-dpkg-support.patch
cpick-84806336-chore-Add-feature-flag-for-manual-network-waiting
no-remove-networkd-online.patch
cpick-d75840be-fix-retry-AWS-hotplug-for-async-IMDS-5995
cpick-c60771d8-test-pytestify-test_url_helper.py
cpick-8810a2dc-test-Remove-CiTestCase-from-test_url_helper.py
cpick-582f16c1-test-add-OauthUrlHelper-tests
cpick-9311e066-fix-Update-OauthUrlHelper-to-use-readurl-exception_cb
Loading
Loading