- name: test
  service: portal
  command: /data/run-tests.sh

- name: push_develop
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Timestamp}}"
  tag: develop
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: push_branch_tag
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Branch}}"
  exclude: master
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: push_production
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Timestamp}}"
  tag: master
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: deploy_staging
  service: ecsdeploy
  tag: develop
  command: "-c staging1 -n public-developer-portal -i silintl/developer-portal -e CI_TIMESTAMP -t 600"

- name: deploy_production
  service: ecsdeploy
  tag: master
  command: "-c public-developer-portal-production -n public-developer-portal -i silintl/developer-portal -e CI_TIMESTAMP -t 600"

- name: test
  service: portal
  command: /data/run-tests.sh

- name: push_develop
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Timestamp}}"
  tag: develop
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: push_branch_tag
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Branch}}"
  exclude: master
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: push_production
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "{{.Timestamp}}"
  tag: master
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: push_latest_tag
  service: portal
  type: push
  image_name: silintl/developer-portal
  image_tag: "latest"
  tag: master
  registry: https://index.docker.io/v1/
  encrypted_dockercfg_path: dockercfg.encrypted

- name: deploy_staging
  service: ecsdeploy
  tag: develop
  command: "-c staging1 -n public-developer-portal -i silintl/developer-portal -e CI_TIMESTAMP -t 600"

- name: deploy_production
  service: ecsdeploy
  tag: master
  command: "-c public-developer-portal-production -n public-developer-portal -i silintl/developer-portal -e CI_TIMESTAMP -t 600"

Tag "latest" Docker image, too
Tag "latest" Docker image, too
