Skip to content

We need to enable headers so that the bean type is sent for each kafka message #14091

We need to enable headers so that the bean type is sent for each kafka message

We need to enable headers so that the bean type is sent for each kafka message #14091

Workflow file for this run

name: Verify Build Workflow
on:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
- '.github/workflows/**'
branches: [ main ]
pull_request:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
branches: [ main ]
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-verify:
name: Verify Application Build
runs-on: ubuntu-22.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Checkout Code with Ref '${{ github.ref }}'
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
# Open-Source Machine emulator that allows you to emulate multiple CPU architectures on your machine
- name: Set up QEMU
if: github.event_name == 'push'
uses: docker/setup-qemu-action@v1
# Docker CLI plugin for extended build capabilities with BuildKit
- name: Set up Docker Buildx
if: github.event_name == 'push'
id: buildx
uses: docker/setup-buildx-action@v1
- name: Inspect builder
if: github.event_name == 'push'
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Run linter
run: ./scripts/validate-files.sh
- name: Verify docs generation
run: |
if [ -n "$(git status --untracked-files=no --porcelain docs)" ]; then
echo "Docs needs to be regenerated. Run 'mvn clean install -pl docs -am -DskipTests' and commit the resulting files in the 'docs' folder."
git --no-pager diff docs
exit 1
fi
- name: Build and Test Application
run: ./mvnw clean package --no-transfer-progress -Pprod -DskipTests=false -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5
- name: Login to DockerHub Registry
if: github.event_name == 'push'
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Login to Quay.io Registry
if: github.event_name == 'push'
run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io
- name: Build and Push Application Multi-arch Images
if: github.event_name == 'push'
run: |
docker buildx build --push -f ./distro/docker/target/docker/Dockerfile.jvm -t docker.io/apicurio/apicurio-registry:latest-snapshot -t quay.io/apicurio/apicurio-registry:latest-snapshot --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le ./distro/docker/target/docker
- name: List docker images (debug)
if: github.event_name == 'push' && failure()
run: |
docker images
- name: Slack Notification (Always)
if: github.event_name == 'push' && always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: github.event_name == 'push' && failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
build-verify-ui:
name: Verify UI Build
runs-on: ubuntu-22.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Checkout Code with Ref '${{ github.ref }}'
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'ui/**/package-lock.json'
# Open-Source Machine emulator that allows you to emulate multiple CPU architectures on your machine
- name: Set up QEMU
if: github.event_name == 'push'
uses: docker/setup-qemu-action@v1
# Docker CLI plugin for extended build capabilities with BuildKit
- name: Set up Docker Buildx
if: github.event_name == 'push'
id: buildx
uses: docker/setup-buildx-action@v1
- name: Inspect builder
if: github.event_name == 'push'
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Install Dependencies
working-directory: ui
run: npm install
- name: Lint
working-directory: ui
run: npm run lint
- name: Build
working-directory: ui
run: npm run build
- name: Package
working-directory: ui
run: npm run package
- name: Install Test Dependencies
working-directory: ui/tests
run: npm install
- name: Lint Tests
working-directory: ui/tests
run: npm run lint
- name: Login to DockerHub Registry
if: github.event_name == 'push'
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Login to Quay.io Registry
if: github.event_name == 'push'
run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io
- name: Build and Push UI Multi-arch Images
if: github.event_name == 'push'
working-directory: ui
run: docker buildx build --push -f ./Dockerfile -t quay.io/apicurio/apicurio-registry-ui:latest-snapshot -t docker.io/apicurio/apicurio-registry-ui:latest-snapshot --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le .
- name: Slack Notification (Always)
if: github.event_name == 'push' && always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: github.event_name == 'push' && failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
build-native-images:
name: Build and Test Native images
runs-on: ubuntu-22.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Checkout Code with Ref '${{ github.ref }}'
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Workaround jackson-coreutils
run: |
# upstream issue: https://github.com/java-json-tools/jackson-coreutils/issues/59
rm -rf ~/.m2/repository/com/github/java-json-tools
mkdir -p /tmp/coreutils-workaround
( cd /tmp/coreutils-workaround && mvn dependency:get -DremoteRepositories=https://repo1.maven.org/maven2 -Dartifact=com.github.java-json-tools:jackson-coreutils:2.0 )
- name: Build Application
run: ./mvnw clean package -am -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5 --no-transfer-progress
- name: Build Native executables
env:
SKIP_TESTS: "true"
run: |
./mvnw package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -DskipTests=true
- name: Build and Push Temporary image for testing
env:
IMAGE_REPO: ttl.sh/${{ github.sha }}
# maximum allowed
IMAGE_TAG: 1d
run: |
docker build --push -f ./distro/docker/target/docker/Dockerfile.native -t ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-native:1d app/
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.31.1'
kubernetes version: 'v1.26.3'
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Prepare minikube tunnel
run: minikube tunnel &> /dev/null &
- name: Run Integration Tests - Native
run: ./mvnw verify -am -Pci --no-transfer-progress -Pintegration-tests -Dregistry-in-memory-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-native:1d -Premote-mem -pl integration-tests -Dmaven.javadoc.skip=true
- name: Run Integration Tests - Native - Auth
run: ./mvnw verify -am -Pauth --no-transfer-progress -Pintegration-tests -Dregistry-in-memory-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-native:1d -Premote-mem -pl integration-tests -Dmaven.javadoc.skip=true
- name: Collect logs
if: failure()
run: ./.github/scripts/collect_logs.sh
- name: Upload tests logs artifacts
if: failure()
uses: actions/[email protected]
with:
name: tests-logs
path: artifacts
- name: Login to DockerHub Registry
if: github.event_name == 'push'
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Login to Quay.io Registry
if: github.event_name == 'push'
run: docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io
- name: Build and Push Native Images
env:
IMAGE_REPO: quay.io
IMAGE_TAG: latest-snapshot
if: github.event_name == 'push'
run: |
docker build --push -f ./distro/docker/target/docker/Dockerfile.native \
-t quay.io/apicurio/apicurio-registry-native:latest-snapshot \
-t docker.io/apicurio/apicurio-registry-native:latest-snapshot \
app/
- name: List All The Images
run: docker images
- name: Slack Notification (Always)
if: github.event_name == 'push' && always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: github.event_name == 'push' && failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
build-verify-python-sdk:
name: Verify Python SDK
runs-on: ubuntu-22.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Checkout Code with Ref '${{ github.ref }}'
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Poetry
uses: snok/install-poetry@d45b6d76012debf457ab49dffc7fb7b2efe8071d
- name: Install the package
working-directory: python-sdk
run: make install
- name: Check linting
working-directory: python-sdk
run: make lint-check
- name: Build Registry
run: mvn clean package -am -Dskip.npm -DskipTests=true --no-transfer-progress
- name: Run the tests
working-directory: python-sdk
run: make test
- name: Slack Notification (Always)
if: github.event_name == 'push' && always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: github.event_name == 'push' && failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
build-verify-go-sdk:
name: Verify Go SDK
runs-on: ubuntu-22.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Checkout Code with Ref '${{ github.ref }}'
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Go - Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Build Registry
run: mvn clean package -am -Dskip.npm -DskipTests=true --no-transfer-progress
- name: Run the tests
working-directory: go-sdk
run: make test
- name: Slack Notification (Always)
if: github.event_name == 'push' && always()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: github.event_name == 'push' && failure()
run: |
MESSAGE="'${{ github.workflow }}/${{ github.job }}' job FAILED!"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}
# Trigger a deployment workflow in the apicurio-operate-first repository, which will
# deploy the `latest-snapshot` version of registry into the 3scale OpenShift cluster
# that we just built and pushed in the steps above.
trigger-3scale-deploy:
needs: [build-verify, build-verify-ui]
if: github.event_name == 'push'
uses: apicurio/apicurio-3scale-gitops/.github/workflows/deploy_latest_registry.yml@main
secrets: inherit