ibm-cloud-architecture / devops-demo-pipelines

1 stars 5 forks source link

Resolves the issue of the user not able to add pipelines to the kabanero custom resource file #13

Closed oiricaud closed 4 years ago

oiricaud commented 4 years ago

The user was not able to add pipelines to their custom resource upon using the run.sh file. What caused this issue was that the script was not counting the # of pipelines that currently exist in the kabanero.yaml file.

This pull request resolves that issue by first counting the # of pipelines that exist in the stack key, and incrementing by 1 to add the new pipeline at the bottom.

Given the default kabanero pipelines i.e

    stacks:
      pipelines:
      - https:
          url: https://github.com/kabanero-io/kabanero-pipelines/releases/download/0.6.1/default-kabanero-pipelines.tar.gz
        id: default
        sha256: 64aee2805d36127c2f1e0e5f0fc6fdae5cef19360c1bb506137584f3bd0988cc

where the user wants to add a new pipeline


      - https:
          url: https://github.com/oiricaud/pipelines/releases/download/v60.0/default-kabanero-pipelines.tar.gz
        id: package-release-update-pl
        sha256: 86b1902f9f7ce0911f759bbe9e11c27075a3b1f7cca40de59df19eab9afca45d

The pull request now gives the following results in


    stacks:
      pipelines:
      - https:
          url: https://github.com/kabanero-io/kabanero-pipelines/releases/download/0.6.1/default-kabanero-pipelines.tar.gz
        id: default
        sha256: 64aee2805d36127c2f1e0e5f0fc6fdae5cef19360c1bb506137584f3bd0988cc
      - https:
          url: https://github.com/oiricaud/pipelines/releases/download/v60.0/default-kabanero-pipelines.tar.gz
        id: package-release-update-pl
        sha256: 86b1902f9f7ce0911f759bbe9e11c27075a3b1f7cca40de59df19eab9afca45d
oiricaud commented 4 years ago

Can @hollisc or @andrew-suh do a code review if bandwidth is available.