Skip to content

Commit

Permalink
Enable autorelease (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 committed Jun 6, 2019
1 parent 509ab96 commit 0ee7fbb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .kokoro/release/stage.cfg
Expand Up @@ -5,3 +5,33 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-http-java-client/.kokoro/release/stage.sh"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

# Fetch magictoken to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "releasetool-magictoken"
}
}
}

# Fetch api key to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "magic-github-proxy-api-key"
}
}
}
13 changes: 12 additions & 1 deletion .kokoro/release/stage.sh
Expand Up @@ -15,18 +15,29 @@

set -eo pipefail

# Start the releasetool reporter
python3 -m pip install gcp-releasetool
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script

source $(dirname "$0")/common.sh

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

setup_environment_secrets
create_settings_xml_file "settings.xml"

AUTORELEASE="false"
if [[ -n "${AUTORELEASE_PR}" ]]
then
AUTORELEASE="true"
fi

mvn clean install deploy -B \
--settings settings.xml \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}
-Dgpg.homedir=${GPG_HOMEDIR} \
-Ddeploy.autorelease=${AUTORELEASE}


3 changes: 2 additions & 1 deletion pom.xml
Expand Up @@ -257,7 +257,7 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<autoReleaseAfterClose>${deploy.autorelease}</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -554,6 +554,7 @@
<project.httpclient.version>4.5.8</project.httpclient.version>
<project.opencensus.version>0.21.0</project.opencensus.version>
<project.root-directory>..</project.root-directory>
<deploy.autorelease>false</deploy.autorelease>
</properties>

<profiles>
Expand Down

0 comments on commit 0ee7fbb

Please sign in to comment.