Pix4D / cogito

Concourse resource for GitHub Commit Status and Google Chat notifications
MIT License
34 stars 14 forks source link

What json data should be passed onto STDIN when testing /opt/resource/out? #137

Closed dev-jin closed 1 year ago

dev-jin commented 1 year ago

Apologies in advance if this is not the right place to ask questions, but I know no other options.

Within the cogito image, I'm trying to run the /opt/resource/out command by passing on a json data manually through STDIN for PUT. What is the exact format of the data that is required? I keep encountering some argument error from the json data. The task file looks like so:

---
platform: linux
image_resource:
  type: registry-image
  source:
    repository: ((redacted))/cogito-gh-status-resource
    tag: ((redacted))
    username: ((redacted))
    password: ((redacted))
inputs:
  - name: git-source
run:
  path: sh
  args:
    - -exc
    - |
      /opt/resource/out . < git-source/instana-tasks-resource/ci/request-data/request-data-populated.json
dev-jin commented 1 year ago

I was able to figure out the error. Please disregard.

marco-m-pix4d commented 1 year ago

Hello @dev-jin, happy you found an answer. For people coming here in the future, this should help:

See also task test:smoke:put in Taskfile: https://github.com/Pix4D/cogito/blob/5a343cb8b044fa3df459906a92c8dea464596fbe/Taskfile.yml#L90