Remove signing scripts from releng/builder 40/59640/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 28 Jun 2017 22:35:53 +0000 (18:35 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 28 Jun 2017 22:35:56 +0000 (18:35 -0400)
These scripts are migrated into lftools.
https://gerrit.linuxfoundation.org/infra/5343

Change-Id: Iba04fd8579867fd9215a0e5aff3067c7d9ab7052
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
scripts/odlrelease [deleted file]
scripts/odlsign-bulk [deleted file]

diff --git a/scripts/odlrelease b/scripts/odlrelease
deleted file mode 100755 (executable)
index 6152608..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
-##############################################################################
-# Copyright (c) 2015 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
-##############################################################################
-
-ARTIFACT_DIR=".sign-artifacts"
-SIGNATURES_DIR="gpg-signatures"
-
-
-function print_usage {
-    echo "Usage: $0 sign <url>"
-    echo ""
-    echo "    sign   : Downloads and Signs artifacts from Nexus"
-}
-
-
-# Downloads artifacts from a Nexus URL and creates gpg signatures for them
-# and copies the signatures to a separate directory.
-function sign {
-    echo "Signing artifacts..."
-
-    if [ -d "$ARTIFACT_DIR" ]; then
-        echo "$ARTIFACT_DIR directory exists. Clearing..."
-        rm -rf $ARTIFACT_DIR
-    fi
-
-    mkdir $ARTIFACT_DIR
-    cd $ARTIFACT_DIR
-
-    echo "Fetching artifacts from $URL"
-    # Fetch Artifacts
-    wget --recursive --execute robots=off --no-parent --quiet \
-        --no-host-directories --cut-dirs=3 \
-        $URL
-
-    # Remove files that don't need signing
-    find . -type f \
-            -name "*.asc" \
-            -o -name "*.sha1" \
-            -o -name "*.md5" \
-            -o -name "_maven.repositories*" \
-            -o -name "_remote.repositories*" \
-            -o -name "maven-metadata-local.xml*" \
-            -o -name "maven-metadata.xml*" \
-            -o -name "index.html*" | xargs rm
-
-    for f in `find . -type f ! -name "*.asc" ! -name "*.sha1" ! -name "*.md5"`
-    do
-        echo "Signing $f"
-        gpg --batch -abq $f
-    done
-
-    cd ..
-
-    if [ -d "$SIGNATURES_DIR" ]; then
-        echo "$SIGNATURES_DIR directory exists. Clearing..."
-        rm -rf $SIGNATURES_DIR
-    fi
-
-    rsync -avz --include '*/' --include '*.asc' --exclude '*' \
-           "${ARTIFACT_DIR}/org" "${SIGNATURES_DIR}"
-}
-
-
-if [ -z "$2" ]; then
-    print_usage
-    exit 1
-fi
-
-MODE=$1
-URL=$2
-
-if [ "$MODE" == "sign" ]; then
-    sign
-else
-    echo "ERROR: Invalid mode."
-    print_usage
-    exit 1
-fi
diff --git a/scripts/odlsign-bulk b/scripts/odlsign-bulk
deleted file mode 100755 (executable)
index 36443f3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-
-# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
-##############################################################################
-# Copyright (c) 2016 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
-##############################################################################
-
-# Force any errors to cause the script to end with failure
-set -eu -o pipefail
-
-function print_usage {
-    echo "Usage: $0 <staging-repo>"
-    echo ""
-    echo "    <staging-repo>   : The Nexus staging repo ID to sign."
-}
-
-if [ -z "$1" ]; then
-    print_usage
-    exit 1
-fi
-
-SIGNREPO=$1
-SIGNATURES_DIR="gpg-signatures"
-TMPFILE=/tmp/project-list.txt
-
-wget -q https://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/ -O $TMPFILE
-PROJECTS=`grep '/</a>' $TMPFILE | sed -e 's#/</a>.*##' -e 's#.*/">##'`
-echo "Projects detected: $PROJECTS"
-
-#
-# Prepare staging repo to upload signatures to
-#
-
-if [ -d "$SIGNATURES_DIR" ]; then
-    echo "$SIGNATURES_DIR directory exists. Clearing..."
-    rm -rf $SIGNATURES_DIR
-fi
-mkdir $SIGNATURES_DIR
-
-mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy-staged-repository \
-    -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-    -DskipStagingRepositoryClose=true \
-    -DrepositoryDirectory="$SIGNATURES_DIR" \
-    -DnexusUrl=https://nexus.opendaylight.org/ \
-    -DstagingProfileId="425e43800fea70" \
-    -DserverId="opendaylight.staging" | tee /tmp/deploy-staged-repository.log
-
-STAGED_REPO_ID=`grep 'Created staging repository with ID' /tmp/deploy-staged-repository.log | sed -e 's/.*ID "//' -e 's/".*//'`
-echo "Staged Repo: $STAGED_REPO_ID"
-
-#
-# Finally retrieve and sign artifacts.
-#
-
-for i in $PROJECTS
-do
-    echo "Signing $i"
-    ./odlrelease sign http://nexus.opendaylight.org/content/repositories/$SIGNREPO/org/opendaylight/$i/
-    mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy-staged-repository \
-        -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-        -DskipStagingRepositoryClose=true \
-        -DstagingRepositoryId=$STAGED_REPO_ID \
-        -DrepositoryDirectory="$SIGNATURES_DIR" \
-        -DnexusUrl=https://nexus.opendaylight.org/ \
-        -DstagingProfileId="425e43800fea70" \
-        -DserverId="opendaylight.staging"
-done