Skip to content

Commit

Permalink
Merge branch 'main' into feat/operator-java-opts
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann authored Feb 11, 2025
2 parents 5cb9374 + f618cce commit 989f56c
Show file tree
Hide file tree
Showing 68 changed files with 2,170 additions and 1,320 deletions.
36 changes: 36 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Define the directory to monitor
WATCHED_DIR="operator/model/src/main/java"

# Get the list of changed files in the staging area
CHANGED_FILES=$(git diff --cached --name-only)

# Check if any file in the watched directory has been modified
FILES_TO_CHECK=$(echo "$CHANGED_FILES" | grep "^$WATCHED_DIR")

# If no changes detected in the directory, exit successfully
if [ -z "$FILES_TO_CHECK" ]; then
echo "No changes detected to Operator Model, skipping install.yaml regen."
exit 0
fi

# Run your custom command (e.g., linting, formatting, tests, etc.)
echo "Changes detected to Operator Model. Generating install.yaml file..."

# Update the install.yaml file (regenerate it)
cd operator
make SKIP_TESTS=true build IMAGE_TAG=latest-snapshot INSTALL_FILE=install/install.yaml dist-install-file > /dev/null 2>&1

# Capture the exit code of the command
EXIT_CODE=$?

# Exit with the appropriate status
if [ $EXIT_CODE -ne 0 ]; then
echo "Failed to regenerate install.yaml file."
exit 1
fi

echo "Successfully generated install.yaml."
git add ./install/install.yaml
exit 0
144 changes: 0 additions & 144 deletions .github/dependabot.yml

This file was deleted.

26 changes: 8 additions & 18 deletions .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@ on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
- '.github/workflows/**'
- 'operator/install/**'
paths:
- 'operator/**'

pull_request:
branches:
- main
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
- '.github/workflows/**'
- 'operator/install/**'
paths:
- 'operator/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -64,10 +54,10 @@ jobs:
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: v1.33.1
kubernetes version: v1.25.0
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--force'
'minikube version': v1.33.1
'kubernetes version': v1.25.0
'github token': ${{ secrets.GITHUB_TOKEN }}
'start args': '--force'

- name: Enable minikube features
run: |
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Build Registry
run: |
cd registry
./mvnw clean package -am --no-transfer-progress -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5 -Dspotless.check.skip=true
./mvnw clean package -am --no-transfer-progress -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5
- name: Build Registry UI
working-directory: registry/ui
Expand Down Expand Up @@ -168,10 +168,20 @@ jobs:
-t quay.io/apicurio/apicurio-registry-native:$RELEASE_VERSION \
app/
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Slack Notification (Always)
if: 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: 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 }}
26 changes: 18 additions & 8 deletions .github/workflows/release-maven-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,22 @@ jobs:
retry_wait_seconds: 120
command: |
cd registry
mvn deploy --batch-mode -Pprod -Prelease -DskipTests -Dspotless.check.skip=true --settings /home/runner/.m2/settings.xml
mvn deploy --batch-mode -Pprod -Prelease -DskipTests --settings /home/runner/.m2/settings.xml
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Slack Notification (Always)
if: 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: 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 }}
26 changes: 18 additions & 8 deletions .github/workflows/release-sboms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Maven Install
run: |
cd registry
mvn install -Pprod -DskipTests -Dspotless.check.skip=true
mvn install -Pprod -DskipTests
- name: Generate Maven SBOMs
run: |
Expand All @@ -89,10 +89,20 @@ jobs:
git commit -m 'Generated SBOMs for release $RELEASE_VERSION'
git push origin main
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Slack Notification (Always)
if: 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: 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 }}
23 changes: 16 additions & 7 deletions .github/workflows/release-sdk-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,20 @@ jobs:
git push origin "go-sdk/v$RELEASE_VERSION"
GOPROXY=proxy.golang.org go list -m "github.com/apicurio/apicurio-registry@v$RELEASE_VERSION"
- name: Slack Notification (Always)
if: 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: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Slack Notification (Error)
if: 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 }}
24 changes: 17 additions & 7 deletions .github/workflows/release-sdk-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,20 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Slack Notification (Always)
if: 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: 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 }}
Loading

0 comments on commit 989f56c

Please sign in to comment.