Brian Freeman | 48d3054 | 2019-08-20 13:13:58 -0500 | [diff] [blame] | 1 | #!/bin/bash |
2 | |||||
3 | if [ $# -ne 1 ] || [ ! -f $1 ]; then | ||||
4 | echo file not found | ||||
5 | exit 1 | ||||
6 | fi | ||||
7 | |||||
8 | PODS_FILE=$1 | ||||
9 | DIR=$(dirname "$(readlink -f "$PODS_FILE")") | ||||
10 | JOB=$(basename $DIR) | ||||
11 | echo $JOB | ||||
12 | for POD_TO_DELETE in $(cat $PODS_FILE); do | ||||
13 | echo build "$JOB $POD_TO_DELETE" | ||||
14 | java -jar ~/jenkins-cli.jar -s http://localhost:8080/jenkins -auth jenkins:g2jenkins build $JOB -p POD_TO_DELETE=$POD_TO_DELETE | ||||
15 | done |