Skip to content

Instantly share code, notes, and snippets.

@ttrahan
Last active October 27, 2016 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ttrahan/168ac46257c1b8b40bcdf98ef4a681c5 to your computer and use it in GitHub Desktop.
Save ttrahan/168ac46257c1b8b40bcdf98ef4a681c5 to your computer and use it in GitHub Desktop.
#! /bin/bash
# Save state
# used to save state information of Shippable pipeline job for use on next job run or in downstream job
echo -e "\n*** saving state ***"
createOutState() {
STATEFILES_TO_SAVE=( file1 file2 file3 )
STATEFILE_SAVE_LOCATION=/build/state/
for f in "${STATEFILES_TO_SAVE[@]}"; do
cp $f $STATEFILE_SAVE_LOCATION
done
}
createOutState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment