Skip to content

Commit 280117f

Browse files
authored
Provide STAGING_REPOSITORY_ID as an environment variable (#561)
1 parent 34f0427 commit 280117f

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.kokoro/release/drop.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@
1515

1616
set -eo pipefail
1717

18-
source $(dirname "$0")/common.sh
18+
# STAGING_REPOSITORY_ID must be set
19+
if [ -z "${STAGING_REPOSITORY_ID}" ]; then
20+
echo "Missing STAGING_REPOSITORY_ID environment variable"
21+
exit 1
22+
fi
1923

24+
source $(dirname "$0")/common.sh
2025
pushd $(dirname "$0")/../../
2126

2227
setup_environment_secrets
2328
create_settings_xml_file "settings.xml"
2429

25-
mvn nexus-staging:drop --settings=settings.xml
30+
mvn nexus-staging:drop -B \
31+
--settings=settings.xml \
32+
-DstagingRepositoryId=${STAGING_REPOSITORY_ID}

.kokoro/release/promote.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@
1515

1616
set -eo pipefail
1717

18+
# STAGING_REPOSITORY_ID must be set
19+
if [ -z "${STAGING_REPOSITORY_ID}" ]; then
20+
echo "Missing STAGING_REPOSITORY_ID environment variable"
21+
exit 1
22+
fi
23+
1824
source $(dirname "$0")/common.sh
1925

2026
pushd $(dirname "$0")/../../
2127

2228
setup_environment_secrets
2329
create_settings_xml_file "settings.xml"
2430

25-
mvn nexus-staging:release -DperformRelease=true --settings=settings.xml
31+
mvn nexus-staging:release -B \
32+
-DperformRelease=true \
33+
--settings=settings.xml \
34+
-DstagingRepositoryId=${STAGING_REPOSITORY_ID}

0 commit comments

Comments
 (0)