---
steps:
  - name: ':docker: Build'
    agents:
      queue: builder
    plugins:
      docker-compose:
        build: athenaeum
        image-repository: us.gcr.io/pg-shared-v1/athenaeum
        image-name: $BUILDKITE_BUILD_NUMBER

  - wait

  - name: ':jest: :scsslint:'
    command: bin/test
    agents:
      queue: runner
    plugins:
      docker-compose:
        run: athenaeum

  - wait
  - trigger: "athenaeum-main-nav"
    label: ':roller_coaster: Trigger MainNav Build'
    async: true

  - wait

  - block: 'Trigger deploy/publish'
    branches: 'rebrand'
    prompt: 'Choose a version bump'
    fields:
    - select: 'Increment'
      key: 'bump-size'
      hint: "MAJOR: incompatible API changes // MINOR: add backwards-compatible functionality // PATCH: backwards-compatible bug fixes"
      required: true
      options:
        # - label: 'Major'
        #   value: 'major'
        - label: 'Minor'
          value: 'minor'
        - label: 'Patch'
          value: 'patch'

  - block: 'Trigger custom deploy'
    branches: '!rebrand'

  - wait

  - name: ':rocket: :s3: :npm:'
    command: bin/deploy
    agents:
      queue: builder
    plugins:
      docker-compose:
        run: athenaeum

  - wait

  - name: ':rocket: :octocat:'
    command: bin/commit-tag
    branches: rebrand
    agents:
      queue: builder

---
steps:
  - name: ':docker: Build'
    agents:
      queue: builder
    plugins:
      docker-compose:
        build: athenaeum
        image-repository: us.gcr.io/pg-shared-v1/athenaeum
        image-name: $BUILDKITE_BUILD_NUMBER

  - wait

  - name: ':jest: :scsslint:'
    command: bin/test
    agents:
      queue: runner
    plugins:
      docker-compose:
        run: athenaeum

  - wait
  - trigger: "athenaeum-main-nav"
    label: ':roller_coaster: Trigger MainNav Build'
    async: true
    build:
      branch: ${BUILDKITE_BRANCH}

  - wait

  - block: 'Trigger deploy/publish'
    branches: 'rebrand'
    prompt: 'Choose a version bump'
    fields:
    - select: 'Increment'
      key: 'bump-size'
      hint: "MAJOR: incompatible API changes // MINOR: add backwards-compatible functionality // PATCH: backwards-compatible bug fixes"
      required: true
      options:
        # - label: 'Major'
        #   value: 'major'
        - label: 'Minor'
          value: 'minor'
        - label: 'Patch'
          value: 'patch'

  - block: 'Trigger custom deploy'
    branches: '!rebrand'

  - wait

  - name: ':rocket: :s3: :npm:'
    command: bin/deploy
    agents:
      queue: builder
    plugins:
      docker-compose:
        run: athenaeum

  - wait

  - name: ':rocket: :octocat:'
    command: bin/commit-tag
    branches: rebrand
    agents:
      queue: builder

Update build to use correct branch
Update build to use correct branch
