Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Created July 30, 2013 16:24
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 SEJeff/c81792f130a4ad72d176 to your computer and use it in GitHub Desktop.
Save SEJeff/c81792f130a4ad72d176 to your computer and use it in GitHub Desktop.
Initial deployment
# For new deployments, do an initial checkout so that circus comes up and
# all is well in the world, afterwards, jenkins will overwrite all of this
{% if not salt["cmd.run_stdout"]("ls -d /srv/http/appname/src/src-appname") %}
git@giturl:apprepo.git:
git.latest:
- rev: master
- target: /srv/http/appname/src/salt-master-deploy
- runas: appuser
- require:
- file: /home/appuser/.ssh/id_rsa
/srv/http/appname/src/src-appname:
file.symlink:
- target: /srv/http/appname/src/salt-master-deploy
- require:
- git.latest: git@giturl:apprepo.git
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment