Skip to content

Commit 91ce244

Browse files
Pipeline fix (#353)
Fixes CD pipeline for Java
1 parent e226512 commit 91ce244

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

codebuild/cd/deploy-snapshot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ phases:
3838

3939
- gpg --batch --import /tmp/aws-sdk-common-runtime.key.asc
4040
- export GPG_PASSPHRASE=$(aws --query "SecretString" secretsmanager get-secret-value --secret-id cd/aws-crt-java-key/password | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
41+
42+
# Java 17 needs special JDK options apparently. It is a known Sonatype issue.
43+
# Issue link: https://issues.sonatype.org/browse/NEXUS-27902
44+
- export JDK_JAVA_OPTIONS='--add-opens java.base/java.util=ALL-UNNAMED'
45+
4146
build:
4247
commands:
4348
- cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-java-v2/sdk

codebuild/cd/promote-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ phases:
4040
- gpg --batch --import /tmp/aws-sdk-common-runtime.key.asc
4141
- export GPG_PASSPHRASE=$(aws --query "SecretString" secretsmanager get-secret-value --secret-id cd/aws-crt-java-key/password | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
4242
- export REPOSITORY_ID=$(cat $CODEBUILD_SRC_DIR_aws_iot_device_sdk_java_v2_jar/repositoryId.txt)
43+
44+
# Java 17 needs special JDK options apparently. It is a known Sonatype issue.
45+
# Issue link: https://issues.sonatype.org/browse/NEXUS-27902
46+
- export JDK_JAVA_OPTIONS='--add-opens java.base/java.util=ALL-UNNAMED'
47+
4348
build:
4449
commands:
4550
- cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-java-v2/sdk

sdk/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
<plugin>
196196
<groupId>org.sonatype.plugins</groupId>
197197
<artifactId>nexus-staging-maven-plugin</artifactId>
198-
<version>1.6.8</version>
198+
<version>1.6.13</version>
199199
<extensions>true</extensions>
200200
<configuration>
201201
<serverId>ossrh</serverId>
@@ -235,7 +235,7 @@
235235
<plugin>
236236
<groupId>org.apache.maven.plugins</groupId>
237237
<artifactId>maven-gpg-plugin</artifactId>
238-
<version>1.5</version>
238+
<version>1.6</version>
239239
<executions>
240240
<execution>
241241
<id>sign-artifacts</id>
@@ -245,6 +245,10 @@
245245
</goals>
246246
<configuration>
247247
<keyname>${gpg.keyname}</keyname>
248+
<gpgArguments>
249+
<arg>--pinentry-mode</arg>
250+
<arg>loopback</arg>
251+
</gpgArguments>
248252
</configuration>
249253
</execution>
250254
</executions>

0 commit comments

Comments
 (0)