machine:
  environment:
    KUBECONFIG: /home/deploy/.kube/config

dependencies:
  override:
    - "true"

deploy:
  override:
    - kubernetes-deploy rubygems-$ENVIRONMENT rubygems --template-dir config/deploy/$ENVIRONMENT --bindings=environment=$ENVIRONMENT

rollback:
  override:
    - kubernetes-deploy rubygems-$ENVIRONMENT rubygems --template-dir config/deploy/$ENVIRONMENT --bindings=environment=$ENVIRONMENT

tasks:
  restart:
    action: Restart application
    description: Trigger the restart of both unicorn and background workers
    steps:
      - kubernetes-restart rubygems-$ENVIRONMENT rubygems

machine:
  environment:
    KUBECONFIG: /home/deploy/.kube/config

dependencies:
  override:
    - "true"

deploy:
  override:
    - krane render -f config/deploy/$ENVIRONMENT --bindings=environment=$ENVIRONMENT --current-sha=$REVISION | krane deploy rubygems-$ENVIRONMENT rubygems --stdin -f config/deploy/$ENVIRONMENT/secrets.ejson

rollback:
  override:
    - krane render -f config/deploy/$ENVIRONMENT --bindings=environment=$ENVIRONMENT --current-sha=$REVISION | krane deploy rubygems-$ENVIRONMENT rubygems  --stdin -f config/deploy/$ENVIRONMENT/secrets.ejson

tasks:
  restart:
    action: Restart application
    description: Trigger the restart of both unicorn and background workers
    steps:
      - krane restart rubygems-$ENVIRONMENT rubygems

Move from kubernetes-* to krane.
Move from kubernetes-* to krane.
