Skip to content

publish-success

publish-success #1837

Workflow file for this run

# This workflow test deployment of latest dev release
name: CD_Dev
permissions:
contents: read
concurrency:
group: cd_dev
cancel-in-progress: true
on:
# push:
# branches: [master]
# pull_request:
# branches: [master]
repository_dispatch:
types: [ publish-success ]
workflow_dispatch:
inputs:
alt_version:
required: false
description: Provide expected semver for `installer_check` job. If empty `VERSION+<git commit>` in repo will be used
default: ''
env:
USE_VERSION: ${{ github.event.inputs.alt_version }}
K3D_VERSION: v5.4.1
jobs:
setup:
name: Setup inputs
runs-on: ubuntu-latest
outputs:
pub_ref: ${{ steps.out.outputs.pub_ref }}
pub_sha: ${{ steps.out.outputs.pub_sha }}
steps:
- name: Default Info
run: |
echo event_name ${{ github.event_name }}
echo "pub_ref=${{ github.ref }}" >> $GITHUB_ENV
echo "pub_sha=${{ github.sha }}" >> $GITHUB_ENV
- name: Received ci-success event
if: github.event_name == 'repository_dispatch'
id: recv
run: |
echo REF ${{ github.event.client_payload.ref }}
echo SHA ${{ github.event.client_payload.sha }}
echo "pub_ref=${{ github.event.client_payload.ref }}" >> $GITHUB_ENV
echo "pub_sha=${{ github.event.client_payload.sha }}" >> $GITHUB_ENV
- name: Output Setup
# merge optional step output
id: out
run: |
echo REF ${{ env.pub_ref }}
echo SHA ${{ env.pub_sha }}
echo "pub_ref=${{ env.pub_ref }}" >> $GITHUB_OUTPUT
echo "pub_sha=${{ env.pub_sha }}" >> $GITHUB_OUTPUT
# Perform E2E sanity checks
verify_latest_releases:
name: Verify latest run ${{ matrix.run }} (${{ matrix.cluster_type }}) on (${{ matrix.os }})
needs: setup
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cluster_type: [local,k8]
run: [r1]
env:
SLEEP: 10
TOPIC: foobar
steps:
- name: Checkout ${{ needs.setup.outputs.pub_sha }}
uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.pub_sha }}
- name: Set up K3d for Ubuntu
if: ${{ matrix.cluster_type == 'k8' }}
run: |
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
- name: Set up K8 for ubuntu(kind)
if: ${{ matrix.cluster_type == 'k8' }}
run: ./k8-util/cluster/reset-k3d.sh
- name: Setup Fluvio
uses: infinyon/fluvio/.github/actions/setup-fluvio@master
with:
version: latest
- name: Install Local Fluvio cluster
timeout-minutes: 3
if: ${{ matrix.cluster_type == 'local' }}
run: fluvio cluster start --local
- name: Install k8 Fluvio cluster
timeout-minutes: 3
if: ${{ matrix.cluster_type == 'k8' }}
run: |
FLUVIO_IMAGE_TAG_STRATEGY=version-git \
fluvio cluster start --k8 --spu-storage-size 1
- name: Run E2E Test
timeout-minutes: 2
run: |
date +"%Y-%m-%dT%H:%M:%S%z"
fluvio version
fluvio topic create ${{ env.TOPIC }}
# wait for topic to be created
sleep ${{ env.SLEEP }}
date +"%Y-%m-%dT%H:%M:%S%z"
echo foo | fluvio produce ${{ env.TOPIC }}
fluvio consume ${{ env.TOPIC }} --start 0 -d | grep -F -w "foo"
fluvio topic delete "${{ env.TOPIC }}"
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
run: fluvio cluster diagnostics
- name: Upload diagnostics
uses: actions/upload-artifact@v4
timeout-minutes: 5
if: ${{ !success() }}
with:
name: cd_failure_${{ matrix.run }}_${{ matrix.cluster_type }}
path: diagnostics*.gz
- name: Slack Notification
uses: 8398a7/action-slack@v3
if: ${{ !success() }}
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
# Perform upgrade test from previous stable version to latest
k8_cluster_upgrade:
name: Kubernetes cluster upgrade test
needs: setup
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
env:
FLV_SOCKET_WAIT: 600
steps:
- name: Checkout ${{ needs.setup.outputs.pub_sha }}
uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.pub_sha }}
- name: Setup K3d
run: |
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
./k8-util/cluster/reset-k3d.sh
- name: Run upgrade test
timeout-minutes: 10
env:
TEST_DATA_BYTES: 10000
run: |
export PATH=~/.fluvio/bin:$PATH
USE_LATEST=true make upgrade-test
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
run: ~/.fluvio/bin/fluvio cluster diagnostics
- name: Upload diagnostics
uses: actions/upload-artifact@v4
timeout-minutes: 5
if: ${{ !success() }}
with:
name: cluster-upgrade-diag
path: diagnostics*.gz
- name: Slack Notification
uses: 8398a7/action-slack@v3
if: ${{ !success() }}
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
# Verify latest version of CLI
installer_check:
name: Installer check
needs: setup
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
version: [latest]
steps:
- name: Checkout ${{ needs.setup.outputs.pub_sha }}
uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.pub_sha }}
- name: Set the expected fluvio version
run: |
if [[ -z "${{ env.USE_VERSION }}" ]]; then
echo "EXPECTED_VERSION=$(cat VERSION)+$(git rev-parse HEAD)" | tee -a $GITHUB_ENV
else
echo "EXPECTED_VERSION=${{ github.event.inputs.alt_version }}" | tee -a $GITHUB_ENV
fi
echo "EXPECTED_VERSION: $EXPECTED_VERSION"
- name: Curl Install - latest
run: |
curl -fsS https://hub.infinyon.cloud/install/install.sh | \
FLUVIO_VERSION=${{ matrix.version }} bash | \
tee /tmp/installer.version
- name: Verify installer output
run: |
INSTALLER_VERSION=$(cat /tmp/installer.version | grep "fluvio@" | awk '{print $4}' | cut -b 8-)
if [ "$INSTALLER_VERSION" = "$EXPECTED_VERSION" ]; then
echo "✅ Installer version check passed: $EXPECTED_VERSION";
else
echo "❌ Installer version check failed";
echo "Version reported by installer: $INSTALLER_VERSION";
echo "Expected version: $EXPECTED_VERSION";
exit 1;
fi
cli-platform-cross-version-test:
name: CLI (${{ matrix.cli_version }}) x Platform (${{ matrix.cluster_version }}) version test
needs: setup
#if: false
runs-on: ${{ matrix.os }}
env:
FLUVIO_BIN: ~/.fluvio/bin/fluvio
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cluster_version: [stable, latest]
cli_version: [stable, latest]
steps:
- name: Checkout ${{ needs.setup.outputs.pub_sha }}
uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.pub_sha }}
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.2.1
- name: Setup bin path
run: echo "~/.fluvio/bin" >> $GITHUB_PATH
- name: Setup Fluvio
uses: infinyon/fluvio/.github/actions/setup-fluvio@master
with:
version: ${{ matrix.cluster_version }}
- name: Start Fluvio Cluster
timeout-minutes: 10
run: fluvio cluster start --local
- name: CLI ${{ matrix.cli_version }} x Cluster ${{ matrix.cluster_version }}
run: |
make FLUVIO_BIN=~/.fluvio/bin/fluvio SKIP_SETUP=true CLI_VERSION=${{ matrix.cli_version }} CLUSTER_VERSION=${{ matrix.cluster_version }} cli-platform-cross-version-test
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
run: fluvio cluster diagnostics
- name: Upload diagnostics
uses: actions/upload-artifact@v4
timeout-minutes: 5
if: ${{ !success() }}
with:
name: cli-platform-cross-version-test
path: diagnostics*.gz
- name: Slack Notification
uses: 8398a7/action-slack@v3
if: ${{ !success() }}
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}