Skip to content

Commit

Permalink
Merge pull request #1990 from carlesarnal/release-mysql-images
Browse files Browse the repository at this point in the history
Add mysql images for the quarkus distribution
  • Loading branch information
EricWittmann committed Aug 23, 2022
2 parents 7bea377 + 7fe76f5 commit 63b505e
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
java-version: '11'
distribution: 'temurin'

# With the update to quarkus this will build the default images with postgres as the fixed database
- name: Build Project
run: cd studio && mvn clean install -Pprod

Expand Down Expand Up @@ -111,6 +112,40 @@ jobs:
quay.io/apicurio/apicurio-studio-ui:latest-release
quay.io/apicurio/apicurio-studio-ui:${{env.RELEASE_VERSION}}
# Once the regular images are published, build and publish the MySQL ones.
- name: Build Project with MySQL
run: cd studio/platforms/quarkus && mvn clean install -Pmysql

- name: Build and Publish Studio API
uses: docker/build-push-action@v2
with:
context: ./api
file: ./api/Dockerfile
platforms: ${{env.PLATFORMS}}
push: true
tags: |
docker.io/apicurio/apicurio-studio-api-mysql:latest
docker.io/apicurio/apicurio-studio-api-mysql:latest-release
docker.io/apicurio/apicurio-studio-api-mysql:${{env.RELEASE_VERSION}}
quay.io/apicurio/apicurio-studio-api-mysql:latest
quay.io/apicurio/apicurio-studio-api-mysql:latest-release
quay.io/apicurio/apicurio-studio-api-mysql:${{env.RELEASE_VERSION}}
- name: Build and Publish Studio WS
uses: docker/build-push-action@v2
with:
context: ./ws
file: ./ws/Dockerfile
platforms: ${{env.PLATFORMS}}
push: true
tags: |
docker.io/apicurio/apicurio-studio-ws-mysql:latest
docker.io/apicurio/apicurio-studio-ws-mysql:latest-release
docker.io/apicurio/apicurio-studio-ws-mysql:${{env.RELEASE_VERSION}}
quay.io/apicurio/apicurio-studio-ws-mysql:latest
quay.io/apicurio/apicurio-studio-ws-mysql:latest-release
quay.io/apicurio/apicurio-studio-ws-mysql:${{env.RELEASE_VERSION}}
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@releases/v1
Expand Down
13 changes: 13 additions & 0 deletions platforms/quarkus/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mysql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
Expand Down Expand Up @@ -193,6 +197,15 @@
<quarkus.profile>prod</quarkus.profile>
</properties>
</profile>
<profile>
<id>mysql</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<quarkus.profile>mysql</quarkus.profile>
</properties>
</profile>
<profile>
<id>native</id>
<activation>
Expand Down
13 changes: 12 additions & 1 deletion platforms/quarkus/api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%dev.quarkus.datasource.jdbc.max-size=8
%dev.quarkus.datasource.jdbc.min-size=2

# === Prod profile
# === Prod profile, uses postgres as database

%prod.quarkus.datasource.jdbc.url=${APICURIO_DB_CONNECTION_URL}
%prod.quarkus.datasource.db-kind=postgresql
Expand All @@ -18,6 +18,17 @@
%prod.quarkus.datasource.jdbc.min-size=2
%prod.quarkus.log.level=INFO


# === Prod profile, mysql

%mysql.quarkus.datasource.jdbc.url=${APICURIO_DB_CONNECTION_URL}
%mysql.quarkus.datasource.db-kind=mysql
%mysql.quarkus.datasource.username=${APICURIO_DB_USER_NAME:}
%mysql.quarkus.datasource.password=${APICURIO_DB_PASSWORD:}
%mysql.quarkus.datasource.jdbc.max-size=8
%mysql.quarkus.datasource.jdbc.min-size=2
%mysql.quarkus.log.level=INFO

#http
quarkus.http.cors=true

Expand Down
13 changes: 13 additions & 0 deletions platforms/quarkus/ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-mysql</artifactId>
</dependency>
</dependencies>
<build>
<finalName>apicurio-studio-ws</finalName>
Expand Down Expand Up @@ -122,6 +126,15 @@
<quarkus.profile>prod</quarkus.profile>
</properties>
</profile>
<profile>
<id>mysql</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<quarkus.profile>mysql</quarkus.profile>
</properties>
</profile>
<profile>
<id>native</id>
<activation>
Expand Down
13 changes: 12 additions & 1 deletion platforms/quarkus/ws/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%dev.quarkus.http.port=9090


# === Prod profile
# === Prod profile, uses postgres as database


%prod.quarkus.datasource.jdbc.url=${APICURIO_DB_CONNECTION_URL}
Expand All @@ -22,4 +22,15 @@
%prod.quarkus.log.level=INFO
%prod.quarkus.http.port=8080


# === Prod profile, mysql

%mysql.quarkus.datasource.jdbc.url=${APICURIO_DB_CONNECTION_URL}
%mysql.quarkus.datasource.db-kind=mysql
%mysql.quarkus.datasource.username=${APICURIO_DB_USER_NAME:}
%mysql.quarkus.datasource.password=${APICURIO_DB_PASSWORD:}
%mysql.quarkus.datasource.jdbc.max-size=8
%mysql.quarkus.datasource.jdbc.min-size=2
%mysql.quarkus.log.level=INFO

quarkus.package.type=legacy-jar

0 comments on commit 63b505e

Please sign in to comment.