diff options
author | Danilo Šegan <danilo@segan.org> | 2012-08-17 16:15:10 +0200 |
---|---|---|
committer | Danilo Šegan <danilo@segan.org> | 2012-08-17 16:15:10 +0200 |
commit | b9feabab9861c721b15e493d2bff0b8feb950bdc (patch) | |
tree | d00d1f296622061931b228e41457012d8c888559 /scripts | |
parent | 311dfeb15f9db9d162925af4bd03f9ce3d13db2e (diff) |
Get rid of obsolete jenkins-post-www script.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/jenkins-post-www.sh | 43 | ||||
-rwxr-xr-x | scripts/test_jenkins-post-www.sh_test_structure.sh | 45 |
2 files changed, 0 insertions, 88 deletions
diff --git a/scripts/jenkins-post-www.sh b/scripts/jenkins-post-www.sh deleted file mode 100755 index 6a4705a..0000000 --- a/scripts/jenkins-post-www.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -BASE_PATH=/home/android-build-linaro/android/.tmp -TARGET_PATH=/srv/snapshots.linaro.org/www/android/ - -# Expected argument: username_jobname/buildno -build_path="$1" - -if [[ -n $2 ]]; then - BASE_PATH=$2 -fi - -if [[ -n $3 ]]; then - TARGET_PATH=$3 -fi - -if [ -z "$build_path" ]; then - echo "Missing build path" - exit 1; -fi - -# Paranoid security - alarm on 2 dots separated only by 0 or more backslahes -if echo "$build_path" | grep -q -E '\.\\*\.'; then - echo "No double-dots in build names please" - exit 1 -fi - -if [ ! -d $BASE_PATH/$build_path ]; then - echo "WARNING: Expected directory $BASE_PATH/$build_path does not exist" - exit 0 -fi - -job_dir=$(dirname $build_path) -build_number=$(basename $build_path) -username=`echo "$job_dir" | cut -d_ -f1` -jobname=`echo "$job_dir" | cut -d_ -f2-` - -echo -n "Moving $BASE_PATH/$build_path to $TARGET_PATH/~$username/$jobname/... " && -(mkdir -p "$TARGET_PATH/~$username/$jobname" && \ - cp -a $BASE_PATH/"$build_path" "$TARGET_PATH/~$username/$jobname/" && \ - rm -rf $BASE_PATH/"$build_path" && \ - echo "done") - -cd "$TARGET_PATH/~$username/$jobname/$build_number" && find * -xtype f > MANIFEST diff --git a/scripts/test_jenkins-post-www.sh_test_structure.sh b/scripts/test_jenkins-post-www.sh_test_structure.sh deleted file mode 100755 index 640db98..0000000 --- a/scripts/test_jenkins-post-www.sh_test_structure.sh +++ /dev/null @@ -1,45 +0,0 @@ -#/bin/env bash - -# Test MANIFEST creation for jenkins-post-www.sh - -root=`mktemp -d` - -mkdir -p $root/from/user_build/1/subdir/anotherdir/yetanotherdir -touch $root/from/user_build/1/file1 -touch $root/from/user_build/1/file2 -touch $root/from/user_build/1/file3 -touch $root/from/user_build/1/subdir/subfile1 -touch $root/from/user_build/1/subdir/subfile2 -touch $root/from/user_build/1/subdir/subfile3 - -mkdir -p $root/from/user_build/2/subdir/anotherdir/yetanotherdir -touch $root/from/user_build/2/file1 -touch $root/from/user_build/2/file2 -touch $root/from/user_build/2/file3 -touch $root/from/user_build/2/subdir/subfile1 -touch $root/from/user_build/2/subdir/subfile2 -touch $root/from/user_build/2/subdir/subfile3 - -mkdir -p $root/to - -./jenkins-post-www.sh user_build/1 $root/from $root/to - -# MANIFEST should list all files, but no directories, in $root/from/user_build/1 - -cat > $root/expected << EOF -file1 -file2 -file3 -subdir/subfile3 -subdir/subfile2 -subdir/subfile1 -EOF - -diff $root/expected $root/to/~user/build/1/MANIFEST -if [[ $? == 0 ]]; then - echo "Passed" -else - echo "Failed" -fi - -rm -r $root |