3 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
4 ##############################################################################
5 # Copyright (c) 2016 The Linux Foundation and others.
7 # All rights reserved. This program and the accompanying materials
8 # are made available under the terms of the Eclipse Public License v1.0
9 # which accompanies this distribution, and is available at
10 # http://www.eclipse.org/legal/epl-v10.html
11 ##############################################################################
13 function print_usage {
14 echo "Usage: $0 <staging-repo>"
16 echo " <staging-repo> : The Nexus staging repo ID to sign."
25 SIGNATURES_DIR="gpg-signatures"
26 TMPFILE=/tmp/project-list.txt
28 wget -q https://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/ -O $TMPFILE
29 PROJECTS=`grep '/</a>' $TMPFILE | sed -e 's#/</a>.*##' -e 's#.*/">##'`
30 echo "Projects detected: $PROJECTS"
33 # Prepare staging repo to upload signatures to
36 if [ -d "$SIGNATURES_DIR" ]; then
37 echo "$SIGNATURES_DIR directory exists. Clearing..."
38 rm -rf $SIGNATURES_DIR
42 mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \
43 -DskipStagingRepositoryClose=true \
44 -DrepositoryDirectory="$SIGNATURES_DIR" \
45 -DnexusUrl=https://nexus.opendaylight.org/ \
46 -DstagingProfileId="425e43800fea70" \
47 -DserverId="opendaylight.staging" | tee /tmp/deploy-staged-repository.log
49 STAGED_REPO_ID=`grep 'Created staging repository with ID' /tmp/deploy-staged-repository.log | sed -e 's/.*ID "//' -e 's/".*//'`
50 echo "Staged Repo: $STAGED_REPO"
53 # Finally retrieve and sign artifacts.
59 ./odlrelease sign http://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/$i/
60 mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy-staged-repository \
61 -DskipStagingRepositoryClose=true \
62 -DstagingRepositoryId=$STAGED_REPO_ID \
63 -DrepositoryDirectory="$SIGNATURES_DIR" \
64 -DnexusUrl=https://nexus.opendaylight.org/ \
65 -DstagingProfileId="425e43800fea70" \
66 -DserverId="opendaylight.staging"