Skip to content

Instantly share code, notes, and snippets.

@nafg

nafg/pull.sh Secret

Created May 28, 2017 08:36
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 nafg/7dc260011361a66a7d33c04a05e8e229 to your computer and use it in GitHub Desktop.
Save nafg/7dc260011361a66a7d33c04a05e8e229 to your computer and use it in GitHub Desktop.
#!/bin/bash
branch=$SSH_ORIGINAL_COMMAND
if [ "$branch" == "master" ]; then
saltenv=base
test=False
else
saltenv=$branch
test=True
fi
sudo salt-run fileserver.update backend=git && \
sudo salt --force-color '*' state.apply saltenv=$saltenv test=$test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment