My .gitlab-ci.yaml file v
stages:
- test
postman_tests:
stage: test
image:
name: postman/newman_alpine33
entrypoint: [""]
script:
- newman --version
- npm install -g newman-reporter-junitfull
- npm install -g newman-reporter-junitxray
- apk add --update curl && rm -rf /var/cache/apk/*
- newman run https://api.postman.com/collections/25618800-2d1d5da6-05f3-4d88-88d1-faebffca89f7?access_key=PMAT-01GTVPN0MGG60TY1EX9G4JTFEH -r 'cli,junitfull,junitxray' --reporter-junitfull-export postman_echo_junitfull.xml
- export token=$(curl -H "Content-Type: application/json" -X POST --data "{ \"client_id\": \"$client_id\",\"client_secret\": \"$client_secret\" }" https://xray.cloud.getxray.app/api/v2/authenticate| tr -d '"')
- echo $token
- 'curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"postman_echo_junitfull.xml" https://xray.cloud.getxray.app/api/v2/import/execution/junit?projectKey=TSTXR&testPlanKey=${TESTPLAN}'
artifacts:
when: always
paths:
- postman_echo_junitfull.xml
For line below I get an error (red underline) about "Nested mappings are not allowed in compact mappingsYAML(0)" and "Incorrect type. Expected "string | array".yaml-schema: https://gitlab.com/assets/webpack/ci.030957f4.json"
export token=$(curl -H "Content-Type: application/json" -X POST --data "{ \"client_id\": \"$client_id\",\"client_secret\": \"$client_secret\" }" https://xray.cloud.getxray.app/api/v2/authenticate| tr -d '"')
Could someone please help and correct it for me as I don't know where the issue is
xxxxxxxxxxxxxxxxxxxx