Skip to content

Commit

Permalink
binary jar: publish script should sign artifacts
Browse files Browse the repository at this point in the history
The publish script for the binary jar needs to sign each artifact before
it can be released in a non-snapshot repository. This patch changes the
script to sign the artifacts when invoking it in deploy mode.

Additional changes:

* Default to the release staging repo instead of the snapshot repo
* Fix some script comments

Change-Id: I205765a6a9bedba11a7c96d5a56435f7aed5071e
Reviewed-on: http://gerrit.cloudera.org:8080/12691
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <[email protected]>
  • Loading branch information
mpercy committed Mar 13, 2019
1 parent 89a6a14 commit 549f1fb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions build-support/mini-cluster/publish_mini_cluster_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
# -a, --action: (default "install")
# Either install or deploy. If install, the jars will be
# installed into the local Maven repository. If deploy, the jars
# will be deployed to the remote Maven repository defined by MVN_REPO_URL.
# will be deployed to the remote Maven repository specified by --repo.
#
# -j, --jars: (default "build/mini-cluster")
# Defines the Maven repository url to deploy to.
# Only used when the --action is deploy.
# Specifies the directory where the jars to be published are located.
#
# -r, --repo: (default "https://repository.apache.org/content/repositories/snapshots")
# -r, --repo: (default "https://repository.apache.org/service/local/staging/deploy/maven2/")
# Defines the Maven repository url to deploy to.
# Only used when the --action is deploy.
#
Expand All @@ -48,9 +47,13 @@
# --skipPom:
# If this flag is passed, the pom is not published.
#
# Example:
# Example to stage binaries for a release:
# publish_mini_cluster_binaries.sh -a=deploy -u="foo-user" -p="foo-pass"
#
# Example to publish to the snapshot repository:
# publish_mini_cluster_binaries.sh -a=deploy -u="foo-user" -p="foo-pass" \
# -r=https://repository.apache.org/content/repositories/snapshots
#
################################################################################
set -e

Expand All @@ -61,7 +64,7 @@ VERSION=$(cat ${SOURCE_ROOT}/version.txt)
# Set the parameter defaults.
MVN_ACTION="install"
JAR_PATH="$BUILD_ROOT"
MVN_REPO_URL="https://repository.apache.org/content/repositories/snapshots"
MVN_REPO_URL="https://repository.apache.org/service/local/staging/deploy/maven2/"
PUBLISH_POM=1

# Parse the command line parameters.
Expand Down Expand Up @@ -161,7 +164,7 @@ function maven_action() {
ARGS="$ARGS -DrepositoryId=apache"
ARGS="$ARGS -Drepo.username=$MVN_USERNAME"
ARGS="$ARGS -Drepo.password=$MVN_PASSWORD"
mvn deploy:deploy-file ${ARGS}
mvn gpg:sign-and-deploy-file ${ARGS}
fi
}

Expand Down

0 comments on commit 549f1fb

Please sign in to comment.