-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenAPI client generation (#324)
* Repackage Maven coordinates from com.datastax to io.k8ssandra
- Loading branch information
1 parent
b1bc077
commit e8a223a
Showing
21 changed files
with
764 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish OpenAPI Client | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
publish-openapi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: 'zulu' | ||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Compute commit SHA | ||
run: | | ||
echo "COMMITSHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
- name: Generate OpenAPI client source | ||
run: | | ||
mvn -B clean process-classes -Drevision="0.1.0-${{ env.COMMITSHA }}" | ||
- name: Setup Maven settings.xml | ||
run: | | ||
cat <<EOF > ~/.m2/settings.xml | ||
<settings> | ||
<servers> | ||
<server> | ||
<id>artifactory-releases</id> | ||
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | ||
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | ||
</server> | ||
</servers> | ||
</settings> | ||
EOF | ||
- name: Compile and deploy OpenAPI client | ||
run: | | ||
REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-releases-local" | ||
mvn -B clean deploy \ | ||
-f management-api-server/target/generated-sources/openapi/java-client/pom.xml \ | ||
-Drevision="0.1.0-${{ env.COMMITSHA }}" \ | ||
-DskipTests \ | ||
-DaltDeploymentRepository="${REPO}" \ | ||
-DaltSnapshotDeploymentRepository="${REPO}" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
previous_tag=0 | ||
for current_tag in $(git tag --sort=-creatordate) | ||
do | ||
|
||
if [ "$previous_tag" != 0 ];then | ||
tag_date=$(git log -1 --pretty=format:'%ad' --date=short ${previous_tag}) | ||
printf "## ${previous_tag} (${tag_date})\n\n" | ||
git log ${current_tag}...${previous_tag} --pretty=format:'* %s [View](https://github.com/k8ssandra/management-api-for-apache-cassandra/commit/%H)' --reverse | grep -v Merge | ||
printf "\n\n" | ||
fi | ||
previous_tag=${current_tag} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.