Skip to content

Commit cd19f74

Browse files
committed
[Apps Plugin CI] Add gpg sign to apps plugin
Signed-off-by: Chris Bono <[email protected]>
1 parent 4f9809d commit cd19f74

File tree

6 files changed

+49
-17
lines changed

6 files changed

+49
-17
lines changed

.github/workflows/apps-plugin-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55

66
env:
77
MAVEN_THREADS: '-T 0.5C'
8+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
9+
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
810

911
jobs:
1012
build_deploy_release:
@@ -55,18 +57,23 @@ jobs:
5557
-DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}' \
5658
-B
5759
jfrog rt build-clean
58-
jfrog mvn -gs settings.xml -Pstagingrelease,full,deploymentfiles -B clean install -DskipTests
60+
echo "${MAVEN_GPG_PRIVATE_KEY}" > private.asc
61+
gpg --import --batch --no-tty private.asc
62+
jfrog mvn -B -gs settings.xml -Pstagingrelease -B clean install -DskipTests
5963
jfrog rt build-publish
6064
echo spring_cloud_dataflow_apps_plugin_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
65+
6166
- name: Tag Release
6267
uses: jvalkeal/[email protected]
6368
with:
6469
tag-release-branch: apps-plugin/v${{ env.spring_cloud_dataflow_apps_plugin_version }}
6570
tag-release-tag: ${{ env.spring_cloud_dataflow_apps_plugin_version }}
6671
tag-release-tag-prefix: apps-plugin/v
72+
6773
- name: Promote Build
6874
run: |
6975
jfrog rt build-promote $JFROG_CLI_BUILD_NAME $JFROG_CLI_BUILD_NUMBER libs-release-local
76+
7077
- name: Clean cache
7178
run: |
7279
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

.github/workflows/apps-pluigin-release-maven-central.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ env:
2020
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
2222
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
23-
WORKFLOWS_REF: main
2423

2524
jobs:
2625
deploy-to-maven-central:
@@ -46,9 +45,6 @@ jobs:
4645
jfrog rt download \
4746
--spec ${{ inputs.releaseSpecFile }} \
4847
--spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}"
49-
jarToCheck=$(find central_bundle -name "*.jar" -print -quit)
50-
jarToCheck=${jarToCheck#central_bundle}
51-
echo jarToCheck=$jarToCheck >> $GITHUB_OUTPUT
5248
5349
- name: Deploy to Maven Central
5450
if: env.CENTRAL_TOKEN_USERNAME

spring-cloud-dataflow-apps-plugin/pom.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,39 @@
321321
</repository>
322322
</distributionManagement>
323323
</profile>
324+
<profile>
325+
<id>stagingrelease</id>
326+
<build>
327+
<plugins>
328+
<plugin>
329+
<artifactId>maven-gpg-plugin</artifactId>
330+
<version>3.2.8</version>
331+
<executions>
332+
<execution>
333+
<id>sign-artifacts</id>
334+
<phase>verify</phase>
335+
<goals>
336+
<goal>sign</goal>
337+
</goals>
338+
</execution>
339+
</executions>
340+
<configuration>
341+
<gpgArguments>
342+
<arg>--batch</arg>
343+
<arg>--pinentry-mode=loopback</arg>
344+
</gpgArguments>
345+
</configuration>
346+
</plugin>
347+
</plugins>
348+
</build>
349+
</profile>
324350
<profile>
325351
<id>central</id>
326352
<build>
327353
<plugins>
328354
<plugin>
329355
<artifactId>maven-gpg-plugin</artifactId>
330-
<version>1.6</version>
356+
<version>3.2.8</version>
331357
<executions>
332358
<execution>
333359
<id>sign-artifacts</id>

spring-cloud-dataflow-apps-plugin/spring-cloud-dataflow-apps-docs-plugin/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<relativePath>..</relativePath>
1010
</parent>
1111
<artifactId>spring-cloud-dataflow-apps-docs-plugin</artifactId>
12+
<name>spring-cloud-dataflow-apps-docs-plugin</name>
1213
<packaging>maven-plugin</packaging>
1314
<dependencies>
1415
<dependency>

spring-cloud-dataflow-apps-plugin/spring-cloud-dataflow-apps-generator-plugin/pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
<artifactId>spring-cloud-dataflow-apps-generator-plugin</artifactId>
6-
<packaging>maven-plugin</packaging>
7-
<name>spring-cloud-dataflow-apps-generator-plugin</name>
8-
<parent>
9-
<groupId>org.springframework.cloud</groupId>
10-
<artifactId>spring-cloud-dataflow-apps-plugin-parent</artifactId>
11-
<version>1.1.2-SNAPSHOT</version>
12-
<relativePath>..</relativePath>
13-
</parent>
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<artifactId>spring-cloud-dataflow-apps-generator-plugin</artifactId>
7+
<name>spring-cloud-dataflow-apps-generator-plugin</name>
8+
<packaging>maven-plugin</packaging>
9+
<parent>
10+
<groupId>org.springframework.cloud</groupId>
11+
<artifactId>spring-cloud-dataflow-apps-plugin-parent</artifactId>
12+
<version>1.1.2-SNAPSHOT</version>
13+
<relativePath>..</relativePath>
14+
</parent>
1415
<dependencies>
1516
<dependency>
1617
<groupId>org.apache.maven</groupId>

spring-cloud-dataflow-apps-plugin/spring-cloud-dataflow-apps-metadata-plugin/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>spring-cloud-dataflow-apps-metadata-plugin</artifactId>
5+
<name>spring-cloud-dataflow-apps-metadata-plugin</name>
56
<packaging>maven-plugin</packaging>
67
<parent>
78
<groupId>org.springframework.cloud</groupId>

0 commit comments

Comments
 (0)