Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Updates to continuous deployment pipline
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricky White committed May 23, 2022
1 parent 6d562d7 commit f61b7d6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Deploy
on:
push:
# Publish `master`
branches:
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*
Expand All @@ -21,11 +17,13 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Customize the Maven settings.xml
uses: whelk-io/maven-settings-xml-action@v4
with:
servers: '[{ "id": "sonatype-nexus-snapshots", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }, { "id": "sonatype-nexus-staging", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }]'
servers: '[{ "id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }, { "id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }]'

- name: Configure the application
run: |
Expand All @@ -34,8 +32,8 @@ jobs:
echo "secret_server.tenant = ${{ secrets.TSS_TENANT }}" >> "${properties}"
echo "secret_server.oauth2.username = ${{ secrets.TSS_USERNAME }}" >> "${properties}"
echo "secret_server.oauth2.password = ${{ secrets.TSS_PASSWORD }}" >> "${properties}"
echo "secret.id = 1" >> "${properties}"
echo "secret.id = ${{ secrets.TSS_SECRET_ID }}" >> "${properties}"
- name: Deploy with Maven
run: |
mvn -P github -B -C -ff -ntp -U deploy -Dregistry=https://maven.pkg.github.com/thycotic -Dtoken=GH_TOKEN
mvn -P github -B -C -ff -ntp -U deploy -Dregistry=https://maven.pkg.github.com/thycotic -Dtoken=GH_TOKEN -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
22 changes: 12 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
</configuration>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit f61b7d6

Please sign in to comment.