X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-central.sh;fp=shell%2Fmaven-central.sh;h=dede18d42682aa9693da4892065cf0f6b3bd150e;hb=2f43e2ee13855a63f793d2991f1a3dbf064c1cec;hp=0000000000000000000000000000000000000000;hpb=f0c64f33b5b065b9ab58c06eb46e898cbfcc5218;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-central.sh b/shell/maven-central.sh new file mode 100644 index 00000000..dede18d4 --- /dev/null +++ b/shell/maven-central.sh @@ -0,0 +1,23 @@ +#!/bin/bash -l +# SPDX-License-Identifier: EPL-1.0 +############################################################################## +# Copyright (c) 2018 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +profile_id="${OSSRH_PROFILE_ID:-}" + +# Ensure we fail the job if any steps fail. +set -eux -o pipefail + +MC_TMP_FILE="$(mktemp)" +echo "Staging in OSSRH for Maven Central" +lftools deploy nexus-stage "https://oss.sonatype.org" "$profile_id" "$WORKSPACE/m2repo" | tee "$MC_TMP_FILE" +mc_staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$MC_TMP_FILE") +rm -f "$MC_TMP_FILE" + +echo "$mc_staging_repo https://oss.sonatype.org/content/repositories/$mc_staging_repo" | tee -a "$WORKSPACE/archives/staging-repo.txt"