ci: enable v6 install from r2 test for RPM #3837
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Apt based Linux | |
on: | |
push: | |
branches: | |
- master | |
- fluent-package-v5 | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
define-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-matrix | |
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-object | |
run: echo "matrix=$(cat apt.matrix.json | jq --compact-output)" >> $GITHUB_OUTPUT | |
working-directory: .github/workflows/ | |
build: | |
name: Build | |
timeout-minutes: 120 | |
needs: define-matrix | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache deb | |
uses: actions/cache@v4 | |
id: cache-deb | |
with: | |
path: | | |
fluent-package/apt/repositories | |
fluent-apt-source/apt/repositories | |
fluent-lts-apt-source/apt/repositories | |
v7-test/fluent-package/apt/repositories | |
key: ${{ runner.os }}-cache-${{ matrix.rake-job }}-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', 'fluent-package/templates/**', 'fluent-package/debian/**', 'fluent-package/apt/**/Dockerfile') }} | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.4' | |
- name: Install dependencies | |
if: ${{ ! steps.cache-deb.outputs.cache-hit }} | |
run: | | |
gem install serverspec --no-document | |
- name: Build deb with Docker | |
if: ${{ ! steps.cache-deb.outputs.cache-hit }} | |
run: | | |
rake apt:build APT_TARGETS=${{ matrix.rake-job }} | |
- uses: actions/checkout@v4 | |
if: ${{ ! steps.cache-deb.outputs.cache-hit }} | |
with: | |
path: v7-test | |
- name: Build v7 deb with Docker | |
if: ${{ ! steps.cache-deb.outputs.cache-hit }} | |
run: | | |
cd v7-test | |
git config user.email "[email protected]" | |
git config user.name "Fluentd developers" | |
git am fluent-package/bump-version-v7.patch | |
rake apt:build APT_TARGETS=${{ matrix.rake-job }} | |
- name: Upload fluent-package deb | |
uses: actions/upload-artifact@master | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Upload v7 fluent-package deb | |
uses: actions/upload-artifact@master | |
with: | |
name: v7-packages-${{ matrix.rake-job }} | |
path: v7-test/fluent-package/apt/repositories | |
- name: Upload fluent-apt-source deb | |
uses: actions/upload-artifact@master | |
with: | |
name: packages-apt-source-${{ matrix.rake-job }} | |
path: fluent-apt-source/apt/repositories | |
- name: Upload fluent-lts-apt-source deb | |
uses: actions/upload-artifact@master | |
with: | |
name: packages-lts-apt-source-${{ matrix.rake-job }} | |
path: fluent-lts-apt-source/apt/repositories | |
check_package_size: | |
name: Check Package Size | |
runs-on: ubuntu-latest | |
needs: [define-matrix, build] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Check Package Size | |
run: | | |
fluent-package/apt/pkgsize-test.sh ${{ matrix.rake-job }} amd64 | |
installation_test: | |
name: Installation Test | |
runs-on: ubuntu-latest | |
needs: [define-matrix, build] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Installation Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/apt/install-test.sh | |
piuparts_test: | |
name: Piuparts Test | |
runs-on: ubuntu-latest | |
needs: [define-matrix, build] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Piuparts (Install/Remove/Upgrade) Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--privileged \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/apt/piuparts-test.sh | |
serverspec_test: | |
name: Serverspec Test | |
runs-on: ubuntu-latest | |
needs: [define-matrix, build] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Serverspec Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/apt/serverspec-test.sh | |
confluent_test: | |
name: Confluent Test | |
runs-on: ubuntu-latest | |
needs: [define-matrix, build] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Confluent Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/apt/confluent-test.sh | |
binstubs_test: | |
name: Binstubs Test | |
needs: [define-matrix, build] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
path: fluent-package/apt/repositories | |
- name: Binstubs Test | |
run: | | |
mkdir -p .bundle | |
docker run \ | |
--rm \ | |
--tty \ | |
--env CI=true \ | |
--volume ${PWD}:/fluentd:ro \ | |
${{ matrix.test-docker-image }} \ | |
/fluentd/fluent-package/apt/binstubs-test.sh | |
test: | |
name: Test ${{ matrix.label }} ${{ matrix.test }} | |
needs: [check_package_size, installation_test, piuparts_test, serverspec_test, confluent_test, binstubs_test] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
label: | |
- Debian bookworm amd64 | |
- Debian trixie amd64 | |
- Ubuntu Jammy amd64 | |
- Ubuntu Noble amd64 | |
test: | |
- "update-from-v4.sh" | |
- "update-from-v4.sh via-v5" | |
- "update-from-v5-lts.sh" | |
- "downgrade-to-v4.sh" | |
- "downgrade-to-v5-lts.sh" | |
- "install-newly.sh local" | |
- "install-newly.sh v5" | |
#- "install-newly.sh v6" | |
- "install-newly.sh lts" | |
- "update-to-next-version.sh" | |
- "update-to-next-version-with-backward-compat-for-v4.sh" | |
- "update-to-next-version-service-status.sh enabled active" | |
- "update-to-next-version-service-status.sh enabled inactive" | |
- "update-to-next-version-service-status.sh disabled active" | |
- "update-to-next-version-service-status.sh disabled inactive" | |
- "update-to-next-version-with-auto-and-manual.sh" | |
- "update-to-next-major-version.sh auto active" | |
- "update-to-next-major-version.sh auto inactive" | |
- "update-to-next-major-version.sh manual active" | |
- "update-to-next-major-version.sh manual inactive" | |
- "update-to-next-major-version.sh etc active" | |
- "update-to-next-major-version.sh etc inactive" | |
- "update-without-data-lost.sh v6 v7" | |
- "update-without-data-lost.sh v7 v6" | |
- "obsolete-plugins.sh" | |
include: | |
- label: Debian bookworm amd64 | |
rake-job: debian-bookworm | |
container-image: images:debian/12 | |
- label: Debian trixie amd64 | |
rake-job: debian-trixie | |
container-image: images:debian/13 | |
- label: Ubuntu Jammy amd64 | |
rake-job: ubuntu-jammy | |
container-image: images:ubuntu/22.04 | |
- label: Ubuntu Noble amd64 | |
rake-job: ubuntu-noble | |
container-image: images:ubuntu/24.04 | |
exclude: | |
- label: Debian bookworm amd64 | |
test: update-from-v4.sh | |
- label: Debian bookworm amd64 | |
test: update-from-v4.sh via-v5 | |
- label: Debian bookworm amd64 | |
test: update-to-next-version-with-backward-compat-for-v4.sh | |
- label: Debian bookworm amd64 | |
test: downgrade-to-v4.sh | |
# Temporary disable test for trixie (not released yet) | |
- label: Debian trixie amd64 | |
test: update-from-v4.sh | |
- label: Debian trixie amd64 | |
test: update-from-v4.sh via-v5 | |
- label: Debian trixie amd64 | |
test: update-from-v5-lts.sh | |
- label: Debian trixie amd64 | |
test: downgrade-to-v4.sh | |
- label: Debian trixie amd64 | |
test: downgrade-to-v5-lts.sh | |
- label: Debian trixie amd64 | |
test: install-newly.sh v5 | |
- label: Debian trixie amd64 | |
test: install-newly.sh lts | |
- label: Debian trixie amd64 | |
test: update-to-next-version-with-backward-compat-for-v4.sh | |
- label: Ubuntu Noble amd64 | |
test: update-from-v4.sh | |
- label: Ubuntu Noble amd64 | |
test: update-from-v4.sh via-v5 | |
- label: Ubuntu Noble amd64 | |
test: update-to-next-version-with-backward-compat-for-v4.sh | |
- label: Ubuntu Noble amd64 | |
test: downgrade-to-v4.sh | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-${{ matrix.rake-job }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: v7-packages-${{ matrix.rake-job }} | |
path: v7-test | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-apt-source-${{ matrix.rake-job }} | |
- name: Setup Incus | |
run: | | |
sudo apt update | |
sudo apt install -y -V incus | |
- name: Allow egress network traffic flows for Incus | |
# https://linuxcontainers.org/incus/docs/main/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-incus-and-docker | |
run: | | |
sudo iptables -I DOCKER-USER -i incusbr0 -j ACCEPT | |
sudo iptables -I DOCKER-USER -o incusbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
- name: Setup Incus | |
run: | | |
sudo incus admin init --auto | |
- name: Run Test ${{ matrix.test }} on ${{ matrix.container-image }} | |
run: fluent-package/apt/systemd-test/test.sh ${{ matrix.container-image }} ${{ matrix.test }} |