From d96dc1595eafa02727c6f274a0b9debf19e98c96 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Tue, 28 Apr 2020 18:03:50 -0700 Subject: [PATCH] Remove unused scripts These scripts were part of a previous self release development but is no longer needed since we are using global-jjb self releases. Issue-ID: CIMAN-33 Signed-off-by: Jessica Wagantall Change-Id: Ibbac1c208c8fda5d422f21ecd6c97b8594a4e5e3 --- jjb/include-raw-deploy-archives.sh | 125 -------------------------- jjb/include-update-pom-versions-not-parent.sh | 38 -------- jjb/include-update-pom-versions.sh | 51 ----------- 3 files changed, 214 deletions(-) delete mode 100644 jjb/include-raw-deploy-archives.sh delete mode 100644 jjb/include-update-pom-versions-not-parent.sh delete mode 100644 jjb/include-update-pom-versions.sh diff --git a/jjb/include-raw-deploy-archives.sh b/jjb/include-raw-deploy-archives.sh deleted file mode 100644 index 4d0945aa6..000000000 --- a/jjb/include-raw-deploy-archives.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash - -set +e # Do not affect the build result if some part of archiving fails. - -# Print out git status at the end of the build before we archive if $WORKSPACE -# is a git repo. -if [ -d "$WORKSPACE/.git" ]; then - echo "" - echo "----------> Git Status Report" - git status -fi - -echo "" -echo "----------> Archiving build to logs server" -# Configure wget to not print download status when we download logs or when -# Jenkins is installing Maven (To be clear this is the Jenkins Maven plugin -# using a shell script itself that we are unable to modify directly to affect -# wget). -echo "verbose=off" > ~/.wgetrc - -ARCHIVES_DIR="$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER" -[ "$LOGS_SERVER" ] || LOGS_SERVER="https://logs.onap.org" -[ "$LOGS_REPO_URL" ] || LOGS_REPO_URL="https://nexus.onap.org/service/local/repositories/logs" - -echo "Build logs: $LOGS_SERVER/$SILO/$ARCHIVES_DIR" - -mkdir .archives -cd .archives/ || exit 1 - -cat > deploy-archives.xml < - 4.0.0 - logs - logs - 1.0.0 - pom - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - true - - - - org.sonatype.plugins - maven-upload-plugin - 0.0.1 - - - publish-site - deploy - - upload-file - - - onap-log-archives - $LOGS_REPO_URL/content-compressed - archives.zip - $SILO - - - - - - - -EOF - -mkdir -p "$ARCHIVES_DIR" -mkdir -p "$WORKSPACE/archives" -if [ ! -z "$ARCHIVE_ARTIFACTS" ]; then - pushd "$WORKSPACE" - shopt -s globstar # Enable globstar to copy archives - for f in $ARCHIVE_ARTIFACTS; do - [[ -e $f ]] || continue # handle the case of no files to archive - echo "Archiving $f" >> "$WORKSPACE/.archives/$ARCHIVES_DIR/_archives.log" - dir=$(dirname "$f") - mkdir -p "$WORKSPACE/archives/$dir" - mv "$f" "$WORKSPACE/archives/$f" - done - shopt -u globstar # Disable globstar once archives are copied - popd -fi - - -# Ignore logging if archives doesn't exist -mv "$WORKSPACE/archives/" "$ARCHIVES_DIR" > /dev/null 2>&1 -touch "$ARCHIVES_DIR/_build-details.txt" -echo "build-url: ${BUILD_URL}" >> "$ARCHIVES_DIR/_build-details.txt" -env | grep -v PASSWORD > "$ARCHIVES_DIR/_build-enviroment-variables.txt" - -# capture system info -touch "$ARCHIVES_DIR/_sys-info.txt" -{ - echo -e "uname -a:\n $(uname -a) \n" - echo -e "df -h:\n $(df -h) \n" - echo -e "free -m:\n $(free -m) \n" - echo -e "nproc:\n $(nproc) \n" - echo -e "lscpu:\n $(lscpu) \n" - echo -e "ip addr:\n $(/sbin/ip addr) \n" -} 2>&1 | tee -a "$ARCHIVES_DIR/_sys-info.txt" - -# Magic string used to trim console logs at the appropriate level during wget -echo "-----END_OF_BUILD-----" -wget -O "$ARCHIVES_DIR/console.log" "${BUILD_URL}consoleText" -wget -O "$ARCHIVES_DIR/console-timestamp.log" "$BUILD_URL/timestamps?time=HH:mm:ss&appendLog" -sed -i '/^-----END_OF_BUILD-----$/,$d' "$ARCHIVES_DIR/console.log" -sed -i '/^.*-----END_OF_BUILD-----$/,$d' "$ARCHIVES_DIR/console-timestamp.log" - -gzip "$ARCHIVES_DIR"/*.txt "$ARCHIVES_DIR"/*.log -# find and gzip any 'text' files -find "$ARCHIVES_DIR" -type f -print0 \ - | xargs -0r file \ - | egrep -e ':.*text.*' \ - | cut -d: -f1 \ - | xargs -d'\n' -r gzip -# Compress Java heap dumps using xz -find "$ARCHIVES_DIR" -type f -name \*.hprof -print0 | xargs -0 xz - -zip -r archives.zip "$JENKINS_HOSTNAME/" >> "$ARCHIVES_DIR/_archives.log" -du -sh archives.zip diff --git a/jjb/include-update-pom-versions-not-parent.sh b/jjb/include-update-pom-versions-not-parent.sh deleted file mode 100644 index ace2350a2..000000000 --- a/jjb/include-update-pom-versions-not-parent.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -## Will update POM in workspace with release version - -if [ ! -e version.properties ]; then - echo "Missing version.properties" - exit 1 -fi - -## will setup variable release_version -source ./version.properties - -RELEASE_VERSION=$release_version - -echo Changing POM version to $RELEASE_VERSION - -## handle POM -for file in $(find . -name pom.xml); do - VERSION=$(xpath -q -e '//project/version/text()' $file) - PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) - echo before changes VERSION=$VERSION PVERSION=$PVERSION file=$file - if [ "$VERSION" != "" ]; then - awk -v v=$RELEASE_VERSION ' - // { - if (! done) { - sub(/.*" v "<",$0) - done = 1 - } - } - { print $0 } - ' $file > $file.tmp - mv $file.tmp $file - fi - VERSION=$(xpath -q -e '//project/version/text()' $file) - PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) - echo after changes VERSION=$VERSION PVERSION=$PVERSION file=$file -done - diff --git a/jjb/include-update-pom-versions.sh b/jjb/include-update-pom-versions.sh deleted file mode 100644 index 2d459d03b..000000000 --- a/jjb/include-update-pom-versions.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -## Will update POM in workspace with release version - -if [ ! -e version.properties ]; then - echo "Missing version.properties" - exit 1 -fi - -## will setup variable release_version -source ./version.properties - -RELEASE_VERSION=$release_version - -echo Changing POM version to $RELEASE_VERSION - -## handle POM -for file in $(find . -name pom.xml); do - VERSION=$(xpath -q -e '//project/version/text()' $file) - PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) - echo before changes VERSION=$VERSION PVERSION=$PVERSION file=$file - if [ "$VERSION" != "" ]; then - awk -v v=$RELEASE_VERSION ' - // { - if (! done) { - sub(/.*" v "<",$0) - done = 1 - } - } - { print $0 } - ' $file > $file.tmp - mv $file.tmp $file - fi - if [ "$PVERSION" != "" ]; then - awk -v v=$RELEASE_VERSION ' - // { - if (parent && ! done) { - sub(/.*" v "<",$0) - done = 1 - } - } - // { parent = 1 } - { print $0 } - ' $file > $file.tmp - mv $file.tmp $file - fi - VERSION=$(xpath -q -e '//project/version/text()' $file) - PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) - echo after changes VERSION=$VERSION PVERSION=$PVERSION file=$file -done - -- 2.16.6