blob: e993d54b30c3aa647746f52b30cc81baaa399c0f [file] [log] [blame]
Brian Freeman48d30542019-08-20 13:13:58 -05001#!/bin/bash
2
3if [ $# -ne 1 ] || [ ! -f $1 ]; then
4 echo file not found
5 exit 1
6fi
7
8PODS_FILE=$1
9DIR=$(dirname "$(readlink -f "$PODS_FILE")")
10JOB=$(basename $DIR)
11echo $JOB
12for 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
15done