Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. steps:
  2.  
  3. # GCB will always treat this step as a pass.
  4. # This means the build will always continue to the next step.
  5. - id: Build and Test with Maven
  6. name: 'gcr.io/cloud-builders/mvn'
  7. entrypoint: 'bash'
  8. args:
  9. - '-c'
  10. - |
  11. mvn test || echo "fail" > /workspace/build-status.txt
  12.  
  13. - id: Save Maven Surefire Report to GCS
  14. name: 'gcr.io/cloud-builders/gsutil'
  15. args: ['cp','-r','./target/site/surefire-report.html','gs://gcb-alwayspass/surefire-html-reports/$BUILD_ID/report.html']
  16.  
  17. - id: Bubble Maven result
  18. name: 'gcr.io/cloud-builders/mvn'
  19. entrypoint: 'bash'
  20. args:
  21. - '-c'
  22. - |
  23. if [[ $(< /workspace/build-status.txt) == "fail" ]]; then
  24. exit 1
  25. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement