-
-
Save dstokes/e0ed38d56d2046139ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- deploy.common | |
{%- if 'ruby' in pillar %} | |
- deploy.rails | |
{%- endif %} | |
{% set deploy = pillar['deploy'] %} | |
{% set app_name = deploy['app_name'] %} | |
{% set deploy_dir = deploy.get('deploy_dir', '/srv/deploy') %} | |
{% set app_dir = deploy_dir + '/' + app_name %} | |
get_{{ app_name }}_repo: | |
git.latest: | |
- name: {{ deploy['git_repo'] }} | |
- rev: {{ deploy.get('git_rev', 'HEAD') }} | |
- target: {{ app_dir }}/build | |
- user: {{ deploy['user'] }} | |
- always_fetch: true | |
- require: | |
- sls: deploy.common | |
- require_in: | |
{%- if 'ruby' in pillar %} | |
- sls: deploy.rails | |
{%- endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment