.gitlab-ci.yml 571 B

123456789101112131415161718192021222324252627282930313233
  1. image: maven:latest
  2. variables:
  3. MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
  4. build:
  5. stage: build
  6. script: "mvn $MAVEN_CLI_OPTS package"
  7. test:
  8. stage: test
  9. script:
  10. - mvn $MAVEN_CLI_OPTS test
  11. artifacts:
  12. paths:
  13. - target/site/jacoco/
  14. pages:
  15. stage: deploy
  16. dependencies:
  17. - test
  18. script:
  19. - mkdir public
  20. - mv target/site/jacoco/index.html public
  21. artifacts:
  22. paths:
  23. - public
  24. deploy:
  25. stage: deploy
  26. script:
  27. - mvn $MAVEN_CLI_OPTS verify
  28. only:
  29. - master