How to Pass Parameter to .sh file present in the code?


#1
---
jobs:
- name: show-animal-names
  plan:
  - task: show-animal-names
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      run:
        path: sh
        args: 
        - -c
        - |
          if [ "$cat-name" == "cat" ]
          then
            echo "The cat name is $(cat-name)"
          else
            echo "Not Found"
          fi 
      params:
        CAT_NAME: ((cat-name))
        DOG_NAME: ((dog-name))

Parameter File:

cat-name: cat
dog-name: dog

It says cat-name not found, how do i pass it to the code ?


#2

@crsimmons have a look at this.


#3

CAT-NAME != cat-name

Variables in bash are case sensitive.


#4

Thank You …:heart_eyes: