Skip to content

Commit 6400fd5

Browse files
committed
Maven profiles for release script
Becasue there was an independent step to sign artifaccts in the previous releases using Rapid, the pom.xml files didn't need to have GPG signing configurations. With new release setup, there's no independent step to sign artifacts. We need to use maven-gpg-plugin to sign artifacts.
1 parent cb93985 commit 6400fd5

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

boms/cloud-lts-bom/pom.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,4 +546,51 @@
546546
</dependencies>
547547
</dependencyManagement>
548548

549+
<profiles>
550+
<profile>
551+
<id>release</id>
552+
<activation>
553+
<property>
554+
<name>performRelease</name>
555+
</property>
556+
</activation>
557+
<build>
558+
<plugins>
559+
<plugin>
560+
<groupId>org.apache.maven.plugins</groupId>
561+
<artifactId>maven-gpg-plugin</artifactId>
562+
<version>3.2.7</version>
563+
<executions>
564+
<execution>
565+
<id>sign-artifacts</id>
566+
<phase>verify</phase>
567+
<goals>
568+
<goal>sign</goal>
569+
</goals>
570+
<configuration>
571+
<gpgArguments>
572+
<arg>--pinentry-mode</arg>
573+
<arg>loopback</arg>
574+
</gpgArguments>
575+
</configuration>
576+
</execution>
577+
</executions>
578+
</plugin>
579+
<plugin>
580+
<groupId>org.apache.maven.plugins</groupId>
581+
<artifactId>maven-source-plugin</artifactId>
582+
<version>3.3.1</version>
583+
<executions>
584+
<execution>
585+
<id>attach-sources</id>
586+
<goals>
587+
<goal>jar-no-fork</goal>
588+
</goals>
589+
</execution>
590+
</executions>
591+
</plugin>
592+
</plugins>
593+
</build>
594+
</profile>
595+
</profiles>
549596
</project>

pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@
249249
</profile>
250250
<profile>
251251
<id>release</id>
252+
<activation>
253+
<property>
254+
<name>performRelease</name>
255+
</property>
256+
</activation>
252257
<build>
253258
<plugins>
254259
<plugin>
@@ -277,6 +282,26 @@
277282
</execution>
278283
</executions>
279284
</plugin>
285+
<plugin>
286+
<groupId>org.apache.maven.plugins</groupId>
287+
<artifactId>maven-gpg-plugin</artifactId>
288+
<version>3.2.7</version>
289+
<executions>
290+
<execution>
291+
<id>sign-artifacts</id>
292+
<phase>verify</phase>
293+
<goals>
294+
<goal>sign</goal>
295+
</goals>
296+
<configuration>
297+
<gpgArguments>
298+
<arg>--pinentry-mode</arg>
299+
<arg>loopback</arg>
300+
</gpgArguments>
301+
</configuration>
302+
</execution>
303+
</executions>
304+
</plugin>
280305
</plugins>
281306
</build>
282307
</profile>

0 commit comments

Comments
 (0)