Browse Source

Example usage

refactor_rebased
Jonathan Christison 3 years ago committed by Jonathan Christison
parent
commit
a15014e106
  1. 4
      hack/pssaas-request-curl.sh
  2. 13
      hack/sample-pssaas-bad.json
  3. 11
      hack/sample-pssaas.json
  4. 9
      hack/single-brew-scan.sh
  5. 9
      hack/single-git-scan.sh

4
hack/pssaas-request-curl.sh

@ -0,0 +1,4 @@
#!/bin/bash
curl -H 'Content-Type: application/json' -d '@sample-pssaas.json' localhost:8080/Scan/PSSaaS -vv
curl -H 'Content-Type: application/json' -d '@sample-pssaas-bad.json' localhost:8080/Scan/PSSaaS -vv

13
hack/sample-pssaas-bad.json

@ -0,0 +1,13 @@
{
"product-id": "jochrist-dev-test-rhbq",
"is-managed-service": false,
"cpaas-version": "latest",
"component-list":[
{"build-id":"ASLKGOMQVVAAA",
"type":"pnc"},
{"build-id":"ASLMBTBCNVAAA",
"type":"pnc"},
{"foo":"bar"}],
"some-other-list":[{"this":"shouldn't work"}]
}

11
hack/sample-pssaas.json

@ -0,0 +1,11 @@
{
"product-id": "jochrist-dev-test-rhbq",
"is-managed-service": false,
"cpaas-version": "latest",
"component-list":[
{"build-id":"ASLKGOMQVVAAA",
"type":"pnc"},
{"build-id":"ASLMBTBCNVAAA",
"type":"pnc"}]
}

9
hack/single-brew-scan.sh

@ -0,0 +1,9 @@
#!/bin/bash
curl --get \
--data-urlencode "brewId=xterm-366-8.el9" \
localhost:8080/api/v1a/Scan/single/brew -vv
curl --get localhost:8080/api/v1a/Scan/2 -vv
curl --get localhost:8080/api/v1a/Scan/2/run -vv

9
hack/single-git-scan.sh

@ -0,0 +1,9 @@
#!/bin/bash
curl --get \
--data-urlencode "repo=https://code.engineering.redhat.com/gerrit/quarkusio/quarkus.git" \
--data-urlencode "ref=2.13.8.Final-redhat-00001" \
localhost:8080/api/v1a/Scan/single/git -vv
curl --get localhost:8080/api/v1a/Scan/1 -vv
Loading…
Cancel
Save