summaryrefslogtreecommitdiffstats
path: root/jjb/releng/opnfv-repo-archiver.sh
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2020-02-12 12:19:29 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2020-02-12 12:19:29 -0800
commit3f2b6edc49ca2b557db76c6f03ed8b88e012888e (patch)
tree0852a729b89ac25d5ece45abd6620171c4935982 /jjb/releng/opnfv-repo-archiver.sh
parent41a16d7f0fd608bd7e342a844a1bf9b21e8dba6a (diff)
Remove No Longer Needed 'archive-repositories' Job
This job was written for Scott Winslow to easly pull in a tarball of all the OPNFV source code to do license scanning. As Scott notified us he'll be running the job himself from now on, we can remove it from the OPNFV Jenkins system. Change-Id: I0856a77fd8f0c1b7454c57aa96b626e97b87da10 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb/releng/opnfv-repo-archiver.sh')
-rw-r--r--jjb/releng/opnfv-repo-archiver.sh68
1 files changed, 0 insertions, 68 deletions
diff --git a/jjb/releng/opnfv-repo-archiver.sh b/jjb/releng/opnfv-repo-archiver.sh
deleted file mode 100644
index 7a92e6f1b..000000000
--- a/jjb/releng/opnfv-repo-archiver.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 Linux Foundation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -o errexit
-set -o pipefail
-export PATH=$PATH:/usr/local/bin/
-
-DATE="$(date +%Y%m%d)"
-
-declare -a PROJECT_LIST
-EXCLUDE_PROJECTS="All-Projects|All-Users|securedlab|^test"
-CLONE_PATH="$WORKSPACE/opnfv-repos"
-
-# Generate project list from gerrit
-PROJECT_LIST=($(ssh -p 29418 jenkins-ci@gerrit.opnfv.org gerrit ls-projects | egrep -v $EXCLUDE_PROJECTS))
-
-echo "Cloning all OPNFV repositories"
-echo "------------------------------"
-
-for PROJECT in "${PROJECT_LIST[@]}"; do
- echo "> Cloning $PROJECT"
- if [ ! -d "$CLONE_PATH/$PROJECT" ]; then
- git clone "https://gerrit.opnfv.org/gerrit/$PROJECT.git" $CLONE_PATH/$PROJECT
- else
- pushd "$CLONE_PATH/$PROJECT" &>/dev/null
- git pull -f origin master
- popd &> /dev/null
- fi
-
- # Don't license scan kernel or qemu in kvmfornfv
- if [ "$PROJECT" == "kvmfornfv" ]; then
- rm -rf "$CLONE_PATH/$PROJECT/"{kernel,qemu}
- fi
-done
-
-echo "Finished cloning OPNFV repositories"
-echo "-----------------------------------"
-
-# Copy repos and clear git data
-echo "Copying repos to $WORKSPACE/opnfv-archive and removing .git files"
-cp -R $CLONE_PATH $WORKSPACE/opnfv-archive
-find $WORKSPACE/opnfv-archive -type d -iname '.git' -exec rm -rf {} +
-find $WORKSPACE/opnfv-archive -type f -iname '.git*' -exec rm -rf {} +
-
-# Create archive
-echo "Creating archive: opnfv-archive-$DATE.tar.gz"
-echo "--------------------------------------"
-cd $WORKSPACE
-tar -czf "opnfv-archive-$DATE.tar.gz" opnfv-archive && rm -rf opnfv-archive
-echo "Archiving Complete."
-
-echo "Uploading artifacts"
-echo "--------------------------------------"
-
-gsutil cp "$WORKSPACE/opnfv-archive-$DATE.tar.gz" \
- "gs://opnfv-archive/opnfv-archive-$DATE.tar.gz" 2>&1
-
-echo "https://storage.googleapis.com/opnfv-archive/opnfv-archive-$DATE.tar.gz" > archive-link.txt
-
-rm -f opnfv-archive-$DATE.tar.gz
-
-echo "Finished"