Skip to content

Commit 32e0998

Browse files
authored
Merge branch 'main' into fix-ts-sdk
2 parents eab3523 + 973378e commit 32e0998

File tree

943 files changed

+34536
-39243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

943 files changed

+34536
-39243
lines changed

.github/test-mvn-deploy/pom.xml

+24-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
54

6-
<groupId>com.apicurio.test</groupId>
7-
<artifactId>verify-registry-maven-deploy</artifactId>
8-
<version>1.0.0-SNAPSHOT</version>
9-
<name>verify-registry-maven-deploy</name>
10-
<description>Simple Project to verify the deployment of Apicurio Registry JARS</description>
5+
<groupId>com.apicurio.test</groupId>
6+
<artifactId>verify-registry-maven-deploy</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<name>verify-registry-maven-deploy</name>
9+
<description>Simple Project to verify the deployment of Apicurio Registry JARS</description>
1110

12-
<properties>
13-
<!-- To be filled at runtime using "-Dversion.apicurio=1.x.x.Final" -->
14-
<version.apicurio>TBD</version.apicurio>
15-
</properties>
11+
<properties>
12+
<!-- To be filled at runtime using "-Dversion.apicurio=1.x.x.Final" -->
13+
<version.apicurio>TBD</version.apicurio>
14+
</properties>
1615

17-
<dependencies>
18-
<dependency>
19-
<groupId>io.apicurio</groupId>
20-
<artifactId>apicurio-registry-serdes-avro-serde</artifactId>
21-
<version>${version.apicurio}</version>
22-
</dependency>
23-
<dependency>
24-
<groupId>io.apicurio</groupId>
25-
<artifactId>apicurio-registry-java-sdk</artifactId>
26-
<version>${version.apicurio}</version>
27-
</dependency>
28-
</dependencies>
16+
<dependencies>
17+
<dependency>
18+
<groupId>io.apicurio</groupId>
19+
<artifactId>apicurio-registry-serdes-avro-serde</artifactId>
20+
<version>${version.apicurio}</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>io.apicurio</groupId>
24+
<artifactId>apicurio-registry-java-sdk</artifactId>
25+
<version>${version.apicurio}</version>
26+
</dependency>
27+
</dependencies>
2928
</project>

.github/workflows/release-images.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ jobs:
9999
node-version: 16
100100

101101
- name: Build Registry
102-
run: cd registry && make SKIP_TESTS=true BUILD_FLAGS='-Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5' build-all
102+
run: |
103+
cd registry
104+
./mvnw -T 1.5C clean install --no-transfer-progress -Pprod -DskipTests=true -DskipCommitIdPlugin=false -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5
103105
104106
- name: Build Registry UI
105107
run: |
@@ -117,6 +119,7 @@ jobs:
117119

118120
- name: Build and Push Multi-arch Application Images
119121
run: |
122+
cd registry
120123
docker buildx build --push -f ./distro/docker/target/docker/Dockerfile.jvm \
121124
-t docker.io/apicurio/apicurio-registry:latest \
122125
-t docker.io/apicurio/apicurio-registry:latest-release \
@@ -126,8 +129,7 @@ jobs:
126129
-t quay.io/apicurio/apicurio-registry:$RELEASE_VERSION \
127130
--platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le ./distro/docker/target/docker
128131
129-
- name: Build and Push UI Multi-arch Images
130-
if: github.event_name == 'push'
132+
- name: Build and Push Multi-arch UI Images
131133
run: |
132134
cd registry/ui
133135
docker buildx build --push -f ./Dockerfile \
@@ -138,15 +140,15 @@ jobs:
138140
-t quay.io/apicurio/apicurio-registry-ui:latest-release \
139141
-t quay.io/apicurio/apicurio-registry-ui:$RELEASE_VERSION \
140142
--platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le .
141-
142143
143144
- name: Build Native executables
144145
env:
145146
SKIP_TESTS: "true"
146147
run: |
148+
cd registry
147149
./mvnw -T 1.5C package --no-transfer-progress -Pnative -Dquarkus.native.container-build=true -Pprod -DskipTests=true
148150
149-
- name: Build and Push Temporary image for testing
151+
- name: Build and Push Native image for testing
150152
run: |
151153
docker build --push -f ./distro/docker/target/docker/Dockerfile.native \
152154
-t docker.io/apicurio/apicurio-registry-native:latest \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release Maven Artifacts
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: 'Release tag name'
7+
required: true
8+
release:
9+
types: [released, prereleased]
10+
11+
12+
env:
13+
# The values are extracted from the github.event context,
14+
# which is only available when the workflow gets triggered by a release event.
15+
RELEASE_VERSION: ${{ github.event.release.name }}
16+
BRANCH: ${{ github.event.release.target_commitish }}
17+
18+
19+
jobs:
20+
release-sdk:
21+
if: github.repository_owner == 'Apicurio'
22+
runs-on: ubuntu-20.04
23+
timeout-minutes: 15
24+
env:
25+
RELEASE_TYPE: release
26+
steps:
27+
- name: Fetch Release Details
28+
if: github.event_name == 'workflow_dispatch'
29+
run: |
30+
touch release.json && curl https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ github.event.inputs.tag }} > release.json
31+
echo "RELEASE_VERSION=$(cat release.json | jq -r '.name')" >> $GITHUB_ENV
32+
echo "BRANCH=$(cat release.json | jq -r '.target_commitish')" >> $GITHUB_ENV
33+
34+
- name: Download Source Code
35+
run: |
36+
git config --global user.name "apicurio-ci"
37+
git config --global user.email "apicurio.ci@gmail.com"
38+
git clone --branch $RELEASE_VERSION --single-branch https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry.git registry
39+
40+
# We have faced issues in the past where a github release was created from a wrong commit
41+
# This step will ensure that the release was created from the right commit
42+
- name: Verify Project Version
43+
run: |
44+
cd registry
45+
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
46+
if [[ $PROJECT_VERSION != $RELEASE_VERSION ]]
47+
then
48+
echo "ERROR: Project Version '${PROJECT_VERSION}' does not match with Released Version '${RELEASE_VERSION}'"
49+
exit 1
50+
fi
51+
52+
- name: Set up settings.xml
53+
run: |
54+
pwd
55+
mkdir -p /home/runner/.m2
56+
chmod 755 /home/runner/.m2
57+
echo "<settings><servers><server><id>${{ secrets.OSSRH_ID }}</id><username>${{ secrets.OSSRH_USERNAME }}</username><password>${{ secrets.OSSRH_TOKEN }}</password></server></servers><profiles><profile><id>${{ secrets.OSSRH_ID }}</id><activation><activeByDefault>true</activeByDefault></activation><properties><gpg.executable>gpg</gpg.executable><gpg.passphrase>${{ secrets.GPG_PASSPHRASE}}</gpg.passphrase></properties></profile></profiles></settings>" > /home/runner/.m2/settings.xml
58+
cat /home/runner/.m2/settings.xml
59+
60+
- name: Import GPG Key
61+
uses: crazy-max/ghaction-import-gpg@f6f458f535f4ccdf100400ee0755c0e857226a66
62+
env:
63+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
64+
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
65+
66+
- name: Maven Deploy
67+
if: github.event.inputs.skip-maven-deploy == 'false'
68+
run: |
69+
cd registry
70+
# Retry 3 times before the steps actually fails
71+
(echo "===== Maven Deploy Attempt: 1 ====" && mvn deploy --batch-mode -Pprod -Psql -Pmssql -Pkafkasql -Prelease -DskipTests --settings /home/runner/.m2/settings.xml) || \
72+
(echo "===== Maven Deploy Attempt: 2 ====" && mvn deploy --batch-mode -Pprod -Psql -Pmssql -Pkafkasql -Prelease -DskipTests --settings /home/runner/.m2/settings.xml) || \
73+
(echo "===== Maven Deploy Attempt: 3 ====" && mvn deploy --batch-mode -Pprod -Psql -Pmssql -Pkafkasql -Prelease -DskipTests --settings /home/runner/.m2/settings.xml) || \
74+
(echo "==== Maven Deploy Step Failed ====" && exit 1)
75+
76+
- name: Google Chat Notification
77+
if: ${{ failure() }}
78+
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
79+
with:
80+
name: ${{ github.job }}
81+
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
82+
status: ${{ job.status }}

.github/workflows/release-sdk-go.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Release SDK (Go)
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: 'Release tag name'
7+
required: true
8+
release:
9+
types: [released, prereleased]
10+
11+
12+
env:
13+
# The values are extracted from the github.event context,
14+
# which is only available when the workflow gets triggered by a release event.
15+
RELEASE_VERSION: ${{ github.event.release.name }}
16+
BRANCH: ${{ github.event.release.target_commitish }}
17+
18+
19+
jobs:
20+
release-sdk:
21+
if: github.repository_owner == 'Apicurio'
22+
runs-on: ubuntu-20.04
23+
timeout-minutes: 15
24+
env:
25+
RELEASE_TYPE: release
26+
steps:
27+
- name: Fetch Release Details
28+
if: github.event_name == 'workflow_dispatch'
29+
run: |
30+
touch release.json && curl https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ github.event.inputs.tag }} > release.json
31+
echo "RELEASE_VERSION=$(cat release.json | jq -r '.name')" >> $GITHUB_ENV
32+
echo "BRANCH=$(cat release.json | jq -r '.target_commitish')" >> $GITHUB_ENV
33+
34+
- name: Download Source Code
35+
run: |
36+
git config --global user.name "apicurio-ci"
37+
git config --global user.email "apicurio.ci@gmail.com"
38+
git clone --branch $RELEASE_VERSION --single-branch https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry.git registry
39+
40+
# We have faced issues in the past where a github release was created from a wrong commit
41+
# This step will ensure that the release was created from the right commit
42+
- name: Verify Project Version
43+
run: |
44+
cd registry
45+
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
46+
if [[ $PROJECT_VERSION != $RELEASE_VERSION ]]
47+
then
48+
echo "ERROR: Project Version '${PROJECT_VERSION}' does not match with Released Version '${RELEASE_VERSION}'"
49+
exit 1
50+
fi
51+
52+
- name: Go - Setup Go
53+
uses: actions/setup-go@v5
54+
with:
55+
go-version: '1.20'
56+
57+
# Needs special tagging to use submodules: https://stackoverflow.com/a/64705638/7898052
58+
- name: Release Go SDK
59+
run: |
60+
cd registry
61+
git tag "v$RELEASE_VERSION"
62+
git tag "go-sdk/v$RELEASE_VERSION"
63+
git push origin "v$RELEASE_VERSION"
64+
git push origin "go-sdk/v$RELEASE_VERSION"
65+
GOPROXY=proxy.golang.org go list -m "github.com/apicurio/apicurio-registry@v$RELEASE_VERSION"
66+
67+
68+
- name: Google Chat Notification
69+
if: ${{ failure() }}
70+
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
71+
with:
72+
name: ${{ github.job }}
73+
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
74+
status: ${{ job.status }}
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Release SDK (Python)
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: 'Release tag name'
7+
required: true
8+
release:
9+
types: [released, prereleased]
10+
11+
12+
env:
13+
# The values are extracted from the github.event context,
14+
# which is only available when the workflow gets triggered by a release event.
15+
RELEASE_VERSION: ${{ github.event.release.name }}
16+
BRANCH: ${{ github.event.release.target_commitish }}
17+
18+
19+
jobs:
20+
release-sdk:
21+
if: github.repository_owner == 'Apicurio'
22+
runs-on: ubuntu-20.04
23+
timeout-minutes: 15
24+
env:
25+
RELEASE_TYPE: release
26+
steps:
27+
- name: Fetch Release Details
28+
if: github.event_name == 'workflow_dispatch'
29+
run: |
30+
touch release.json && curl https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ github.event.inputs.tag }} > release.json
31+
echo "RELEASE_VERSION=$(cat release.json | jq -r '.name')" >> $GITHUB_ENV
32+
echo "BRANCH=$(cat release.json | jq -r '.target_commitish')" >> $GITHUB_ENV
33+
34+
- name: Download Source Code
35+
run: |
36+
git config --global user.name "apicurio-ci"
37+
git config --global user.email "apicurio.ci@gmail.com"
38+
git clone --branch $RELEASE_VERSION --single-branch https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry.git registry
39+
40+
# We have faced issues in the past where a github release was created from a wrong commit
41+
# This step will ensure that the release was created from the right commit
42+
- name: Verify Project Version
43+
run: |
44+
cd registry
45+
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
46+
if [[ $PROJECT_VERSION != $RELEASE_VERSION ]]
47+
then
48+
echo "ERROR: Project Version '${PROJECT_VERSION}' does not match with Released Version '${RELEASE_VERSION}'"
49+
exit 1
50+
fi
51+
52+
- uses: actions/setup-python@v4
53+
with:
54+
python-version: '3.11'
55+
56+
- name: Install Poetry
57+
uses: snok/install-poetry@d45b6d76012debf457ab49dffc7fb7b2efe8071d
58+
59+
- name: Release Python SDK
60+
run: |
61+
cd registry/python-sdk
62+
make publish
63+
env:
64+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
65+
66+
- name: Google Chat Notification
67+
if: ${{ failure() }}
68+
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
69+
with:
70+
name: ${{ github.job }}
71+
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
72+
status: ${{ job.status }}

0 commit comments

Comments
 (0)