pivotal / docs-platform-automation

docs repo for the Platform Automation package
https://docs.pivotal.io/platform-automation/
Other
13 stars 12 forks source link

Invalid formatting in opsman and multi product sample pipeline #21

Closed patrick-huber-pivotal closed 5 years ago

patrick-huber-pivotal commented 5 years ago

URL or GitHub link to the page where you're having the issue https://docs.pivotal.io/platform-automation/v3.0/pipeline/multiple-products.html#jobs

Is your request for a change or addition to content related to a problem? If so, please describe. The formatting is off where multiple lines have incorrect whitespace prefixing. The most notable are the individual tasks are tabbed to the right.

Describe the solution you'd like

Here is the corrected pipeline

jobs:
  - name: test-platform-automation
    serial: true
    plan:
    - aggregate:
      - get: platform-automation-image
        params:
          unpack: true
      - get: platform-automation-tasks
        params:
          unpack: true
      - get: configuration
    - task: test-interpolate
      image: platform-automation-image
      file: platform-automation-tasks/tasks/test-interpolate.yml
      params:
        CONFIG_FILE: download-product-configs/pas.yml
        SKIP_MISSING: true
      input_mapping:
        config: configuration
    - task: test
      file: platform-automation-tasks/tasks/test.yml
      image: platform-automation-image
  - name: delete-opsman
    serial: true
    plan:
    - aggregate:
      - get: platform-automation-image
        params:
          unpack: true
      - get: platform-automation-tasks
        params:
          unpack: true
      - get: configuration
      - get: state
    - task: interpolate-creds
      <<: *interpolate-creds
    - task: delete-installation
      image: platform-automation-image
      file: platform-automation-tasks/tasks/delete-installation.yml
      input_mapping:
        env: interpolated-creds
    - task: delete-vm
      image: platform-automation-image
      file: platform-automation-tasks/tasks/delete-vm.yml
      input_mapping:
        config: interpolated-creds
    - put: state
      params:
        file: generated-state/state.yml
  - name: install-opsman
    serial: true
    serial_groups: [ install ]
    plan:
      - aggregate:
        - get: platform-automation-image
          params:
            unpack: true
        - get: one-time-trigger
          trigger: true
        - get: platform-automation-tasks
          params:
            unpack: true
        - get: configuration
        - get: state
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: download-opsman-image
        image: platform-automation-image
        file: platform-automation-tasks/tasks/download-product-s3.yml
        params:
          CONFIG_FILE: download-product-configs/opsman.yml
        input_mapping:
          config: interpolated-creds
        output_mapping:
          downloaded-product: opsman-image
      - task: create-vm
        image: platform-automation-image
        file: platform-automation-tasks/tasks/create-vm.yml
        input_mapping:
          image: opsman-image
          config: interpolated-creds
        ensure: &put-state
          do:
            - put: state
              params:
                file: state/state.yml
      - task: configure-authentication
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-authentication.yml
        attempts: 10
        input_mapping:
          env: interpolated-creds
          config: interpolated-creds
      - task: configure-director
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-director.yml
        input_mapping:
          config: interpolated-creds
          env: interpolated-creds
      - task: apply-director-changes
        image: platform-automation-image
        file: platform-automation-tasks/tasks/apply-director-changes.yml
        input_mapping:
          env: interpolated-creds

  - name: staged-director-config
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-tasks
            params: {unpack: true}
          - get: platform-automation-image
            params: {unpack: true}
          - get: configuration
          - get: state
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: staged-director-config
        image: platform-automation-image
        file: platform-automation-tasks/tasks/staged-director-config.yml
        input_mapping:
          env: interpolated-creds
        ensure: *put-state

  - name: export-installation
    serial: true
    plan:
      - aggregate:
          - get: daily-trigger
            trigger: true
          - get: platform-automation-image
            params:
              unpack: true
            passed: [ install-opsman ]
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
          - get: one-time-trigger
            passed: [ install-opsman ]
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: export-installation
        image: platform-automation-image
        file: platform-automation-tasks/tasks/export-installation.yml
        input_mapping:
          env: interpolated-creds
        params:
          INSTALLATION_FILE: installation-$timestamp.zip
      - put: installation
        params:
          file: installation/installation*.zip

  - name: upgrade-opsman
    serial: true
    serial_groups: [ install ]
    plan:
      - aggregate:
          - get: one-time-trigger
            passed: [ export-installation ]
          - get: platform-automation-image
            params:
              unpack: true
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: installation
            passed: [ export-installation ]
          - get: configuration
          - get: state
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: download-opsman-image
        image: platform-automation-image
        file: platform-automation-tasks/tasks/download-product-s3.yml
        params:
          CONFIG_FILE: download-product-configs/opsman.yml
        input_mapping:
          config: interpolated-creds
        output_mapping:
          downloaded-product: opsman-image
      - task: upgrade-opsman
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upgrade-opsman.yml
        input_mapping:
          image: opsman-image
          config: interpolated-creds
          env: interpolated-creds
        ensure: *put-state
      - task: configure-director
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-director.yml
        input_mapping:
          config: interpolated-creds
          env: interpolated-creds
      - task: apply-director-changes
        image: platform-automation-image
        file: platform-automation-tasks/tasks/apply-director-changes.yml
        input_mapping:
          env: interpolated-creds

  - name: upload-and-stage-pas
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - upgrade-opsman
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: download-pas
        image: platform-automation-image
        file: platform-automation-tasks/tasks/download-product-s3.yml
        params:
          CONFIG_FILE: download-product-configs/pas.yml
        input_mapping:
          config: interpolated-creds
        output_mapping:
          downloaded-product: pas-product
          downloaded-stemcell: pas-stemcell
      - task: upload-product
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-product.yml
        input_mapping:
          product: pas-product
          env: interpolated-creds
      - task: upload-pas-stemcell
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-stemcell.yml
        input_mapping:
          env: interpolated-creds
          stemcell: pas-stemcell
      - task: stage-product
        image: platform-automation-image
        file: platform-automation-tasks/tasks/stage-product.yml
        input_mapping:
          product: pas-product
          env: interpolated-creds

  - name: configure-pas
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - upload-and-stage-pas
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: configure-pas
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-product.yml
        input_mapping:
          config: interpolated-creds
          env: interpolated-creds
        params:
          CONFIG_FILE: cf.yml

  - name: upload-and-stage-pas-windows
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - upgrade-opsman
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: pas-windows-product
          - get: pas-windows-stemcell
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: upload-product
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-product.yml
        input_mapping:
          product: pas-windows-product
          env: interpolated-creds
      - task: upload-pas-windows-stemcell
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-stemcell.yml
        input_mapping:
          env: interpolated-creds
          stemcell: pas-windows-stemcell
      - task: stage-product
        image: platform-automation-image
        file: platform-automation-tasks/tasks/stage-product.yml
        input_mapping:
          product: pas-windows-product
          env: interpolated-creds

  - name: configure-pas-windows
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - upload-and-stage-pas-windows
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: configure-pas
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-product.yml
        input_mapping:
          config: interpolated-creds
          env: interpolated-creds
        params:
          CONFIG_FILE: pas-windows.yml

  - name: upload-and-stage-healthwatch
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            trigger: true
            passed: [ "upgrade-opsman" ]
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: download-healthwatch
        image: platform-automation-image
        file: platform-automation-tasks/tasks/download-product-s3.yml
        params:
          CONFIG_FILE: download-product-configs/healthwatch.yml
        input_mapping:
          config: interpolated-creds
        output_mapping:
          downloaded-product: healthwatch-product
          downloaded-stemcell: healthwatch-stemcell
      - task: upload-and-stage-product
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-and-stage-product.yml
        input_mapping:
          product: healthwatch-product
          env: interpolated-creds
      - task: upload-healthwatch-stemcell
        image: platform-automation-image
        file: platform-automation-tasks/tasks/upload-stemcell.yml
        input_mapping:
          env: interpolated-creds
          stemcell: healthwatch-stemcell

  - name: configure-healthwatch
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - upload-and-stage-healthwatch
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: configure-healthwatch
        image: platform-automation-image
        file: platform-automation-tasks/tasks/configure-product.yml
        input_mapping:
          config: interpolated-creds
          env: interpolated-creds
        params:
          CONFIG_FILE: healthwatch.yml

  - name: apply-product-changes
    serial: true
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
            passed:
              - configure-healthwatch
              - configure-pas
              - configure-pas-windows
            trigger: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: pre-deploy-check
        image: platform-automation-image
        file: platform-automation-tasks/tasks/pre-deploy-check.yml
        input_mapping:
          env: interpolated-creds
      - task: apply-product-changes
        image: platform-automation-image
        file: platform-automation-tasks/tasks/apply-changes.yml
        input_mapping:
          env: interpolated-creds
  - name: staged-pas-config
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
          - get: state
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: staged-config
        image: platform-automation-image
        file: platform-automation-tasks/tasks/staged-config.yml
        input_mapping:
          env: interpolated-creds
        params:
          PRODUCT_NAME: cf
        ensure: *put-state

  - name: staged-healthwatch-config
    plan:
      - aggregate:
          - get: platform-automation-image
            params:
              unpack: true
          - get: platform-automation-tasks
            params:
              unpack: true
          - get: configuration
          - get: state
      - task: interpolate-creds
        <<: *interpolate-creds
      - task: staged-config
        image: platform-automation-image
        file: platform-automation-tasks/tasks/staged-config.yml
        input_mapping:
          env: interpolated-creds
        params:
          PRODUCT_NAME: p-healthwatch
        ensure: *put-state

Describe alternatives you've considered n/a

Additional context n/a

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

jtarchie commented 5 years ago

Good catch, thanks for pointing it out. We'll take a look at fixing it.

jtarchie commented 5 years ago

This should be fixed. Thanks for the issue.