jobs:
- name: hello-world-job
  plan:
  - task: hello-world-task
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: busybox
      outputs:
      - name: the-artifact
      run:
        # This is a neat way of embedding a script into a task
        path: sh
        args:
        - -cx
        - |
          ls -l .
          echo "hello from another step!" > the-artifact/message
  # Add a second task that reads the contents of the-artifact/message
  - task: read-the-artifact
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: busybox
      # To receive "the-artifact", specify it as an input
      inputs:
      - name: the-artifact
      run:
        path: sh
        args:
        - -cx
        - |
          ls -l .
          cat the-artifact/message
          cp -a the-artifact /tmp/
