---
stages:
- name: BUILD
  inputs:
  - type: git
    branch: master
    service: ${BASE_REPO}
  triggers:
  - type: commit
  jobs:
  - name: Build
    type: builder
    build_type: shell
    script: |
      #!/bin/bash
      echo "Building"
      export JAVA_HOME=$JAVA8_HOME
      chmod +x gradlew
      ./gradlew build --console=plain
- name: DEPLOY
  inputs:
  - type: job
    stage: BUILD
    job: Build
  triggers:
  - type: stage
  jobs:
  - name: Build Container
    type: builder
    extension_id: ibm.devops.services.pipeline.container.builder
    target:
      region_id: ${PROD_REGION_ID}
      organization: ${PROD_ORG_NAME}
      space: ${PROD_SPACE_NAME}
    IMAGE_NAME: ${CF_APP_NAME}
    USE_CACHED_LAYERS: 'true'
    script: |
      #!/bin/bash
      echo "Deploying"
      ls
      echo "DOne with basic list"
      ls -lra
      echo "DOne with recursive list"
      tree
      echo "Done with tree"

---
stages:
- name: BUILD
  inputs:
  - type: git
    branch: master
    service: ${BASE_REPO}
  triggers:
  - type: commit
  jobs:
  - name: Build
    type: builder
    build_type: shell
    script: |
      #!/bin/bash
      echo "Building"
      export JAVA_HOME=$JAVA8_HOME
      chmod +x gradlew
      ./gradlew build --console=plain
- name: DEPLOY
  inputs:
  - type: job
    stage: BUILD
    job: Build
  triggers:
  - type: stage
  jobs:
  - name: Build Container
    type: builder
    extension_id: ibm.devops.services.pipeline.container.builder
    target:
      region_id: ${PROD_REGION_ID}
      organization: ${PROD_ORG_NAME}
      space: ${PROD_SPACE_NAME}
    IMAGE_NAME: ${CF_APP_NAME}
    USE_CACHED_LAYERS: 'true'
    COMMAND: |
      #!/bin/bash
      echo "Deploying"
      ls
      echo "DOne with basic list"
      ls -lra
      echo "DOne with recursive list"
      tree
      echo "Done with tree"

Move ICS to use command instead of script
Move ICS to use command instead of script

Signed-off-by: pavittr <d0bf7a2cad222deb9ae2c588e240de3d87c6e782@uk.ibm.com>
