Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee8953bd93 | ||
|
|
563f88bdad | ||
|
|
4cb662f076
|
No files matched your search
@@ -1,9 +1,8 @@
|
||||
description: >
|
||||
Publishes artifacts to Maven Central (Sonatype Central Portal)
|
||||
- Restores Maven dependency cache
|
||||
- Debugs Maven settings to verify configuration
|
||||
- Configures Maven credentials without logging settings
|
||||
- Sets up GPG signing for artifact verification
|
||||
- Deploys signed artifacts to Maven Central using release profile
|
||||
- Deploys signed artifacts and waits for confirmed Central release publication
|
||||
- Saves Maven cache for future builds
|
||||
|
||||
steps:
|
||||
|
||||
@@ -27,7 +27,10 @@ set -e
|
||||
##############################################
|
||||
# Resolve CI-friendly coordinates without stripping parent/BOM configuration.
|
||||
# Flatten must share this Maven process so deploy uses the resolved project POMs.
|
||||
# Central 0.8.x: this completion flag overrides inherited literal waitUntil=uploaded.
|
||||
# Do not report a release as successful until Central confirms publication.
|
||||
mvn -s /tmp/circleci/mvn-settings.xml -P release -B -DskipTests \
|
||||
-Dgpg.keyname="$GPG_KEYNAME" -Dgpg.passphrase="$GPG_PASSPHRASE" \
|
||||
-DwaitForPublishCompletion=true \
|
||||
-Dflatten.mode=resolveCiFriendliesOnly -DupdatePomFile=true \
|
||||
org.codehaus.mojo:flatten-maven-plugin:1.7.3:flatten deploy
|
||||
@@ -49,10 +49,26 @@ release
|
||||
-DskipTests
|
||||
-Dgpg.keyname=test-key
|
||||
-Dgpg.passphrase=test-passphrase
|
||||
-DwaitForPublishCompletion=true
|
||||
-Dflatten.mode=resolveCiFriendliesOnly
|
||||
-DupdatePomFile=true
|
||||
org.codehaus.mojo:flatten-maven-plugin:1.7.3:flatten
|
||||
deploy
|
||||
EOF
|
||||
diff -u "$test_dir/expected-args" "$test_dir/mvn-args"
|
||||
# A Central validation failure or publication timeout must fail this wrapper.
|
||||
cat > "$test_dir/bin/mvn" <<'EOF'
|
||||
#!/bin/bash
|
||||
exit 42
|
||||
EOF
|
||||
set +e
|
||||
PATH="$test_dir/bin:$PATH" GPG_KEYNAME=test-key GPG_PASSPHRASE=test-passphrase \
|
||||
bash "$test_dir/deploy.sh" > "$test_dir/failure-output" 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
if [ "$status" -ne 42 ]; then
|
||||
echo 'Deploy did not preserve Maven publication failure' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Maven settings setup and deploy output are safe; deploy arguments preserved'
|
||||
Reference in new issue
Block a user