Skip to content

Instantly share code, notes, and snippets.

@lox

lox/pipeline.yml Secret

Last active August 14, 2019 04:37
Show Gist options
  • Save lox/045a4b56a0c1e1c815fd011657c34b46 to your computer and use it in GitHub Desktop.
Save lox/045a4b56a0c1e1c815fd011657c34b46 to your computer and use it in GitHub Desktop.
Testing spawning long running processes in bash
steps:
- label: ":llama:"
command: bash tick.sh
plugins:
- docker#v3.2.0:
image: "ubuntu:18.04"
debug: true
init: true
#!/bin/bash
trap 'echo "Got an INT signal"' INT
trap 'echo "Got a TERM signal"' TERM
trap 'echo "Got a QUIT signal"' QUIT
trap 'script is finishing' EXIT
for ((i=0; i<1000; i++)); do
printf "tick: %d\n" "$i"
sleep 1 || true
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment