Skip to content

Commit

Permalink
Add Cloudsmith.io repository (#336)
Browse files Browse the repository at this point in the history
* Add Cloudsmith.io repository
  • Loading branch information
emerkle826 authored Aug 7, 2023
1 parent ba5b85b commit c62dbb5
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 7 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/maven-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ jobs:
<id>artifactory-releases</id>
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
</server>
<server>
<id>artifactory</id>
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
</server>
<server>
<id>cloudsmith</id>
<username>${{ secrets.CLOUDSMITH_USERNAME }}</username>
<password>${{ secrets.CLOUDSMITH_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
Expand All @@ -57,6 +62,7 @@ jobs:
RELEASE_VERSION="${GITHUB_REF##*/}"
RELEASE_VERSION="${RELEASE_VERSION:1}"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
# - name: Deploy Artifacts to GitHub Packages
# run: |
# REPO="gh::default::https://maven.pkg.github.com/${GITHUB_REPOSITORY}"
Expand All @@ -66,15 +72,27 @@ jobs:
# -DskipTests \
# -DaltDeploymentRepository="${REPO}" \
# -DaltSnapshotDeploymentRepository="${REPO}"
- name: Deploy Artifacts to Datsatx Artifactory

# - name: Deploy Artifacts to Datsatx Artifactory
# run: |
# REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-public-releases-local"
# mvn -B clean deploy \
# -P dse,dse7 \
# -Drevision="${{ env.RELEASE_VERSION }}" \
# -DskipTests \
# -DaltDeploymentRepository="${REPO}" \
# -DaltSnapshotDeploymentRepository="${REPO}"

- name: Deploy Artifacts to Cloudsmith.io Artifactory
run: |
REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-public-releases-local"
REPO="cloudsmith::default::https://maven.cloudsmith.io/thelastpickle/reaper-mvn/"
mvn -B clean deploy \
-P dse,dse7 \
-Drevision="${{ env.RELEASE_VERSION }}" \
-DskipTests \
-DaltDeploymentRepository="${REPO}" \
-DaltSnapshotDeploymentRepository="${REPO}"
# - name: Deploy OpenAPI client to GitHub Packages
# run: |
# REPO="gh::default::https://maven.pkg.github.com/${GITHUB_REPOSITORY}"
Expand All @@ -84,9 +102,20 @@ jobs:
# -DskipTests \
# -DaltDeploymentRepository="${REPO}" \
# -DaltSnapshotDeploymentRepository="${REPO}"
- name: Deploy OpenAPI client to Datastax Artifactory

# - name: Deploy OpenAPI client to Datastax Artifactory
# run: |
# REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-public-releases-local"
# mvn -B clean deploy \
# -f management-api-server/target/generated-sources/openapi/java-client/pom.xml \
# -Drevision="${{ env.RELEASE_VERSION }}" \
# -DskipTests \
# -DaltDeploymentRepository="${REPO}" \
# -DaltSnapshotDeploymentRepository="${REPO}"

- name: Deploy OpenAPI client to Cloudsmith.io Artifactory
run: |
REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-public-releases-local"
REPO="cloudsmith::default::https://maven.cloudsmith.io/thelastpickle/reaper-mvn/"
mvn -B clean deploy \
-f management-api-server/target/generated-sources/openapi/java-client/pom.xml \
-Drevision="${{ env.RELEASE_VERSION }}" \
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/openapi-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Publish OpenAPI Client
on:
workflow_dispatch:
inputs:
repository:
description: 'Maven Artifact Repository'
required: false
default: 'cloudsmith'
type: choice
options:
- cloudsmith
- datastax
- both
jobs:
publish-openapi:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,10 +44,16 @@ jobs:
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username>
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password>
</server>
<server>
<id>cloudsmith</id>
<username>${{ secrets.CLOUDSMITH_USERNAME }}</username>
<password>${{ secrets.CLOUDSMITH_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
- name: Compile and deploy OpenAPI client
- name: Compile and deploy OpenAPI client (Datastax Artifactory)
if: ${{ inputs.repository == 'datastax' || inputs.repository == 'both' }}
run: |
REPO="artifactory-releases::default::https://repo.datastax.com/artifactory/datastax-public-releases-local"
mvn -B clean deploy \
Expand All @@ -46,3 +62,13 @@ jobs:
-DskipTests \
-DaltDeploymentRepository="${REPO}" \
-DaltSnapshotDeploymentRepository="${REPO}"
- name: Compile and deploy OpenAPI client (Cloudsmith.io Artifactory)
if: ${{ inputs.repository == 'cloudsmith' || inputs.repository == 'both' }}
run: |
REPO="cloudsmith::default::https://maven.cloudsmith.io/thelastpickle/reaper-mvn/"
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}"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changelog for Management API, new PRs should update the `main / unreleased` sect
## unreleased
[CHANGE] [#323](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/323) Rename Maven artifact groupId from com.datastax to io.k8ssandra
[FEATURE] [#323](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/323) Add OpenAPI Java client generation
[FEATURE] [#337](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/337) Publish Maven artifacts to Cloudsmith.io


## Releases older than this point did not maintain a Changelog in the format above. The changes below were generated by the gen_changelog.sh script.
Expand Down

0 comments on commit c62dbb5

Please sign in to comment.