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

HPCC4J-548 Deployment to jfrog artifactory #689

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 27 additions & 4 deletions .github/workflows/publish-release-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
tags:
- '*-release'
jobs:
publish:
publish-maven-central:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
Expand All @@ -23,4 +23,27 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER_NAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }}
publish-jfrog-artifactory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Jfrog Artifactory Deployment
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
server-id: 'jfrog'
server-username: JFROG_USER
server-password: JFROG_TOKEN
gpg-private-key: ${{ secrets.SIGNING_SECRET }}
gpg-passphrase: JFROG_GPG_PASSPHRASE
- name: Publish package
run: mvn -Pjfrog-artifactory -Dgpg.passphrase=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DstagingProgressTimeoutMinutes=20 clean deploy -e
env:
JFROG_USER: ${{ secrets.JFROG_USER }}
JFROG_TOKEN: ${{ secrets.JFROG_TOKEN }}
JFROG_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }}
JFROG_URL: ${{ vars.JFROG_URL }}
JFROG_SNAPSHOT_REPOSITORY: ${{ vars.JFROG_SNAPSHOT_REPOSITORY }}
JFROG_REPOSITORY: ${{ vars.JFROG_REPOSITORY }}
31 changes: 28 additions & 3 deletions .github/workflows/publish-snapshots-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
create:
branches:
- 'candidate-*'

jobs:
publish:
publish-maven-central:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
Expand All @@ -25,3 +26,27 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USER_NAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASS }}
publish-jfrog-artifactory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Jfrog Artifactory Deployment
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
server-id: 'jfrog-snapshot'
server-username: JFROG_USER
server-password: JFROG_TOKEN
gpg-private-key: ${{ secrets.SIGNING_SECRET }}
gpg-passphrase: JFROG_GPG_PASSPHRASE
- name: Publish package
if: contains(github.ref_name, '-release') == false
run: mvn -Pjfrog-artifactory -Dgpg.passphrase=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DstagingProgressTimeoutMinutes=20 clean deploy -e
env:
JFROG_USER: ${{ secrets.JFROG_USER }}
JFROG_TOKEN: ${{ secrets.JFROG_TOKEN }}
JFROG_GPG_PASSPHRASE: ${{ secrets.SIGN_MODULES_PASSPHRASE }}
JFROG_URL: ${{ vars.JFROG_URL }}
JFROG_SNAPSHOT_REPOSITORY: ${{ vars.JFROG_SNAPSHOT_REPOSITORY }}
JFROG_REPOSITORY: ${{ vars.JFROG_REPOSITORY }}
75 changes: 75 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,81 @@
</plugins>
</build>
</profile>
<profile>
<id>jfrog-artifactory</id>
<properties>
<maven.gpg.skip>false</maven.gpg.skip>
<groups>org.hpccsystems.commons.annotations.BaseTests</groups>
</properties>
<!-- Needed for access to jfrog servers given github stored secrets -->
<distributionManagement>
<repository>
<id>jfrog</id>
<url>${env.JFROG_URL}/artifactory/${env.JFROG_REPOSITORY}</url>
</repository>
<snapshotRepository>
<id>jfrog-snapshot</id>
<url>${env.JFROG_URL}/artifactory/${env.JFROG_SNAPSHOT_REPOSITORY}</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>jfrog</id>
<name>hpccpl-maven-virtual</name>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>${env.JFROG_URL}/artifactory/${env.JFROG_REPOSITORY}</url>
</repository>
<repository>
<id>snapshots</id>
<name>hccpl-maven-snapshot-virtual</name>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>${env.JFROG_URL}/artifactory/${env.JFROG_SNAPSHOT_REPOSITORY}</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.version}</version>
<configuration>
<excludePackageNames>${javadoc.excludePackageNames}</excludePackageNames>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.version}</version>
<configuration>
<useAgent>true</useAgent>
<gpgArguments>
<arg>--batch</arg>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<skip>${maven.gpg.skip}</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>${argLine}</argLine>
<groups>${groups}</groups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<developers>
Expand Down
Loading