Skip to content

Instantly share code, notes, and snippets.

@mdelillo
Created August 2, 2019 16:43
Show Gist options
  • Save mdelillo/620871ee59ca1dca88e7a6be39012b9b to your computer and use it in GitHub Desktop.
Save mdelillo/620871ee59ca1dca88e7a6be39012b9b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for pipeline in $(fly -t "$target" pipelines --json | jq -r '.[].name'); do
for job in $(fly -t "$target" jobs -p "$pipeline" --json | jq -r '.[].name'); do
for build in $(fly -t "$target" builds -j "$pipeline/$job" -c 10 --json | jq -r '.[] | select(.status != "pending" and .status != "started").name'); do
( fly -t "$target" watch -j "$pipeline/$job" -b "$build" | grep -q "$SEARCH_PATTERN" && echo "$pipeline/$job/$build" ) &
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment