简体   繁体   中英

rebot command running in Gitlab-CI return ERROR: Job failed: exit status 1

My job running this command:

- rebot -d ./output/$CI_COMMIT_SHORT_SHA 
  --doc "Report Testing Stage on execution summit ID $CI_COMMIT_SHA" 
  --output testing-stage.xml 
  --log log-testing-stage.html 
  --report report-testing-stage.html 
  ./output/$CI_COMMIT_SHORT_SHA/*.xml

The output reports ERROR: Job failed: exit status 1 Loggin Error

Please let me know how to make the job run successfully. Thanks

In your script section of the gitlab-ci job, add an echo to make sure the GitLab variable is indeed replaced with the correct value (see this thread for illustration)

  stage: info
  script:
    - echo ${CI_COMMIT_SHA}
    - echo ${CI_COMMIT_SHORT_SHA}
    - rebot -d ./output/${CI_COMMIT_SHORT_SHA}
      --doc "Report Testing Stage on execution summit ID ${CI_COMMIT_SHA}" 
      --output testing-stage.xml 
      --log log-testing-stage.html 
      --report report-testing-stage.html 
      ./output/${CI_COMMIT_SHORT_SHA}/*.xml

Use the ${var} form instead of $var .

And finally, check the logs log-testing-stage.html content for any clues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM