Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Data API jar to internal repo in offline mode #1025

Merged
merged 6 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/jar-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: JAR Publish

# runs on
# * every push on the "main"
# * manual trigger
on:
push:
branches: [ "main" ]
workflow_dispatch:

# global env vars, available in all jobs and steps
env:
MAVEN_OPTS: '-Xmx4g'
DS_ARTIFACTORY_USERNAME: ${{ secrets.DS_ARTIFACTORY_USERNAME }}
DS_ARTIFACTORY_PASSWORD: ${{ secrets.DS_ARTIFACTORY_PASSWORD }}

jobs:

# builds and publishes the jar
main:
name: Build and Publish Jar
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: maven

- name: Setup Maven
run: |
mkdir -p ~/.m2
cat <<EOF > ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>stargate-central</id>
<username>${DS_ARTIFACTORY_USERNAME}</username>
<password>${DS_ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>stargate-snapshots</id>
<username>${DS_ARTIFACTORY_USERNAME}</username>
<password>${DS_ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>artifactory</id>
<username>${DS_ARTIFACTORY_USERNAME}</username>
<password>${DS_ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>artifactory-snapshots</id>
<username>${DS_ARTIFACTORY_USERNAME}</username>
<password>${DS_ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>artifactory-releases</id>
<username>${DS_ARTIFACTORY_USERNAME}</username>
<password>${DS_ARTIFACTORY_PASSWORD}</password>
</server>
</servers>
</settings>
EOF

- name: Build
run: |
JAVA_HOME=$JAVA_17 ./mvnw -B -ntp clean package -P offline

- name: Publish JAR
run: |
JAVA_HOME=$JAVA_17 ./mvnw -B -ntp clean deploy -DskipTests -P offline
36 changes: 36 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,42 @@
<quarkus.native.native-image-xmx>6G</quarkus.native.native-image-xmx>
</properties>
</profile>
<profile>
<id>offline</id>
<repositories>
<repository>
<id>artifactory</id>
<url>https://repo.datastax.com/dse</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.datastax.dse</groupId>
<artifactId>dse-db-all</artifactId>
<version>4.0.11-591d171ac9c9</version>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>stargate-central</id>
<name>stargate-releases</name>
<url>https://repo.datastax.com/artifactory/stargate-private</url>
</repository>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>stargate-snapshots</id>
<name>stargate-snapshots</name>
<url>https://repo.datastax.com/artifactory/stargate-private</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>dse-it</id>
<activation>
Expand Down
Loading