#doitlive speed: 2
#doitlive commentecho: true
+#doitlive alias: next="echo 'next up:'"
cd demo
cat job.sh
-echo 'next up:'
+next
#minimal job definition
cat mini.yml
curl -sL localhost:5010/api/v1/jobs/ -F "uploadfile=@mini.yml;"
./job.sh 'mini.yml'
cat /tmp/weles/$(cat id)/TESTFILE/results*
-echo 'next up:'
+next
#pull file from target
cat pull.yml
./job.sh 'pull.yml'
cat /tmp/weles/$(cat id)/TESTFILE/*info.ini
-echo 'next up:'
+next
#push file to target
cat push.yml
curl -sL localhost:9090/echo_foo.sh
./job.sh 'push.yml'
-echo 'next up:'
+next
#run pushed script on the target
colordiff push.yml script.yml
./job.sh 'script.yml'
cat /tmp/weles/$(cat id)/TESTFILE/results*
-echo 'next up:'
+next
+#wrong parameter in YAML job definition
+colordiff mini.yml wrong-param.yml
+./job.sh 'wrong-param.yml'
+
+next
+#nonexistent/unavailable device (on farm managed by Boruta)
+colordiff mini.yml nonex-device.yml
+./job.sh 'nonex-device.yml'
+
+next
+#nonexistent/unreachable artifact in YAML job definition
+colordiff push.yml nonex-artifact.yml
+./job.sh 'nonex-artifact.yml'
+
+next
#run jobs in parallel
cat parallel.yml
for JOB in `seq 1 3`; do curl -sL localhost:5010/api/v1/jobs/ -F "uploadfile=@parallel.yml;" | jq '.jobid' | tee -a jobids; done
-echo 'next up:'
+next
#cancel no longer necessary jobs
while read JOBID; do curl -sL -X POST "localhost:5010/api/v1/jobs/${JOBID}/cancel"; done < jobids
-echo 'next up:'
+next
#flash only necessary partitions
colordiff mini.yml parts.yml
./job.sh 'parts.yml'