version: 2.1

orbs:
  hokusai: artsy/hokusai@0.3.0

not_staging_or_release: &not_staging_or_release
  filters:
    branches:
      ignore:
        - staging
        - release

only_master: &only_master
  context: hokusai
  filters:
    branches:
      only: master

only_release: &only_release
  context: hokusai
  filters:
    branches:
      only: release

workflows:
  default:
    jobs:
      # pre-staging
      - hokusai/test:
          name: test
          <<: *not_staging_or_release

      # staging
      - hokusai/push:
          name: push-staging-image
          <<: *only_master
          requires:
            - test

      - hokusai/deploy-staging:
          <<: *only_master
          project-name: metaphysics
          requires:
            - push-staging-image

      # release
      - hokusai/push:
          name: push-production-image
          <<: *only_release
      - hokusai/deploy-production:
          <<: *only_release
          requires:
            - push-production-image

version: 2.1

orbs:
  hokusai: artsy/hokusai@0.4.0

not_staging_or_release: &not_staging_or_release
  filters:
    branches:
      ignore:
        - staging
        - release

only_master: &only_master
  context: hokusai
  filters:
    branches:
      only: master

only_release: &only_release
  context: hokusai
  filters:
    branches:
      only: release

workflows:
  default:
    jobs:
      # pre-staging
      - hokusai/test:
          name: test
          <<: *not_staging_or_release

      # staging
      - hokusai/push:
          name: push-staging-image
          <<: *only_master
          requires:
            - test

      - hokusai/deploy-staging:
          <<: *only_master
          project-name: metaphysics
          requires:
            - push-staging-image

      # release
      - hokusai/push:
          name: push-production-image
          <<: *only_release
      - hokusai/deploy-production:
          <<: *only_release
          requires:
            - push-production-image

Update hokusai orb to v0.4.0
Update hokusai orb to v0.4.0
