Skip to content

Commit 5f847d3

Browse files
authored
chore: update release process (#344)
1 parent 043f647 commit 5f847d3

File tree

2 files changed

+10
-25
lines changed

2 files changed

+10
-25
lines changed

.kokoro/release.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ before_action {
66
keystore_config_id: 75669
77
keyname: "functions-framework-java-release-bot-sonatype-password"
88
}
9+
keystore_resource {
10+
keystore_config_id: 75669
11+
keyname: "functions-framework-release-sonatype-central-portal-username"
12+
}
13+
keystore_resource {
14+
keystore_config_id: 75669
15+
keyname: "functions-framework-release-sonatype-central-portal-password"
16+
}
917
keystore_resource {
1018
keystore_config_id: 70247
1119
keyname: "maven-gpg-pubkeyring"

.kokoro/release.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,6 @@ setup_environment_secrets() {
2424
mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GNUPGHOME/pubring.gpg
2525
mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GNUPGHOME/secring.gpg
2626
gpg -k
27-
28-
echo "KOKORO_GFILE_DIR: ${KOKORO_GFILE_DIR}"
29-
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
30-
echo "Creating folder for secrets: ${SECRET_LOCATION} (if not exists)"
31-
mkdir -p "${SECRET_LOCATION}"
32-
echo "Content of ${SECRET_LOCATION}:"
33-
ls -alt "${SECRET_LOCATION}"
34-
echo "------"
35-
36-
export SECRET_MANAGER_PROJECT_ID="serverless-runtimes"
37-
export CENTRAL_REPO_USER="sonatype-central-repo-user"
38-
export CENTRAL_REPO_TOKEN="sonatype-central-repo-token"
39-
SECRET_MANAGER_KEYS="${CENTRAL_REPO_USER} ${CENTRAL_REPO_TOKEN}"
40-
echo "SECRET_MANAGER_PROJECT_ID: ${SECRET_MANAGER_PROJECT_ID}, SECRET_MANAGER_KEYS: ${SECRET_MANAGER_KEYS}"
41-
42-
for key in $(echo "${SECRET_MANAGER_KEYS}" | sed "s/,/ /g")
43-
do
44-
gcloud secrets versions access latest \
45-
--project "${SECRET_MANAGER_PROJECT_ID}" \
46-
--secret "${key}" \
47-
--out-file "${SECRET_LOCATION}/${key}"
48-
echo "Created ${SECRET_LOCATION}/${key}"
49-
done
5027
}
5128

5229
create_settings_xml_file() {
@@ -64,8 +41,8 @@ create_settings_xml_file() {
6441
<servers>
6542
<server>
6643
<id>sonatype-central-portal</id>
67-
<username>$(cat "${SECRET_LOCATION}/${CENTRAL_REPO_USER}")</username>
68-
<password>$(cat "${SECRET_LOCATION}/${CENTRAL_REPO_TOKEN}")</password>
44+
<username>$(cat "${KOKORO_KEYSTORE_DIR}/75699_functions-framework-release-sonatype-central-portal-username")</username>
45+
<password>$(cat "${KOKORO_KEYSTORE_DIR}/75699_functions-framework-release-sonatype-central-portal-password")</password>
6946
</server>
7047
</server>
7148
</servers>

0 commit comments

Comments
 (0)