@@ -29,6 +29,13 @@ if [ "$MODE" = "publish" ] || [ "$MODE" = "all" ]; then
2929 export GPG_PASSWORD=$( aws ssm get-parameter --region ${AWS_REGION} --name ${SSM_PREFIX} .signing.gpg_passphrase --with-decryption --query " Parameter.Value" --out text)
3030fi
3131
32+ # Determine whether signing is available (key present and non-empty)
33+ SIGNING_SKIP_FLAG=" "
34+ if [ -z " ${GPG_PRIVATE_KEY:- } " ]; then
35+ echo " WARNING: GPG_PRIVATE_KEY not set — signing will be skipped"
36+ SIGNING_SKIP_FLAG=" -Psigning.skip=true"
37+ fi
38+
3239source .gitlab/scripts/includes.sh
3340
3441LIB_VERSION=$( get_version)
@@ -37,11 +44,11 @@ echo "com.datadoghq:ddprof:${LIB_VERSION}" > version.txt
3744# Assemble task (always needed for artifact creation)
3845if [ " $MODE " = " assemble" ] || [ " $MODE " = " all" ]; then
3946 echo " === Assembling artifact ==="
40- ./gradlew -Pskip-native -Pskip-tests -Pddprof_version=" ${LIB_VERSION} " -PbuildInfo.build.number=$CI_JOB_ID -Pwith-libs=" $( pwd) /libs" :ddprof-lib:jar assembleAll --exclude-task compileFuzzer --exclude-task sign --max-workers=1 --no-build-cache --stacktrace --info --no-watch-fs --no-daemon
47+ ./gradlew -Pskip-native -Pskip-tests -Pddprof_version=" ${LIB_VERSION} " -PbuildInfo.build.number=$CI_JOB_ID -Pwith-libs=" $( pwd) /libs" ${SIGNING_SKIP_FLAG} :ddprof-lib:jar assembleAll --exclude-task compileFuzzer --exclude-task sign --max-workers=1 --no-build-cache --stacktrace --info --no-watch-fs --no-daemon
4148fi
4249
4350# Publish task (only when publishing to Maven Central)
4451if [ " $MODE " = " publish" ] || [ " $MODE " = " all" ]; then
4552 echo " === Publishing to Sonatype ==="
46- ./gradlew -Pskip-native -Pskip-tests -Pddprof_version=" ${LIB_VERSION} " -PbuildInfo.build.number=$CI_JOB_ID -Pwith-libs=" $( pwd) /libs" publishToSonatype closeAndReleaseSonatypeStagingRepository --exclude-task compileFuzzer --max-workers=1 --no-build-cache --stacktrace --info --no-watch-fs --no-daemon
53+ ./gradlew -Pskip-native -Pskip-tests -Pddprof_version=" ${LIB_VERSION} " -PbuildInfo.build.number=$CI_JOB_ID -Pwith-libs=" $( pwd) /libs" ${SIGNING_SKIP_FLAG} publishToSonatype closeAndReleaseSonatypeStagingRepository --exclude-task compileFuzzer --max-workers=1 --no-build-cache --stacktrace --info --no-watch-fs --no-daemon
4754fi
0 commit comments