You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.2 KiB

  1. # This file is a template, and might need editing before it works on your project.
  2. ---
  3. variables:
  4. # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
  5. # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
  6. MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
  7. # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
  8. # when running from the command line.
  9. # `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
  10. MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
  11. # Cache downloaded dependencies and plugins between builds.
  12. # To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
  13. cache:
  14. paths:
  15. - .m2/repository
  16. # For `master` branch run `mvn deploy` automatically.
  17. # Here you need to decide whether you want to use JDK7 or 8.
  18. # To get this working you need to define a volume while configuring your gitlab-ci-multi-runner.
  19. # Mount your `settings.xml` as `/root/.m2/settings.xml` which holds your secrets.
  20. # See https://maven.apache.org/settings.html
  21. Build:
  22. # Use stage test here, so the pages job may later pickup the created site.
  23. stage: build
  24. script:
  25. - mvn -B clean install
  26. - mvn -B test
  27. # Archive up the built documentation site.
  28. artifacts:
  29. paths:
  30. - target/
  31. image: maven
  32. Test:
  33. # Use stage test here, so the pages job may later pickup the created site.
  34. stage: test
  35. script:
  36. - mvn -B test
  37. # Archive up the built documentation site.
  38. artifacts:
  39. paths:
  40. - target/
  41. image: maven
  42. Deploy:
  43. # Use stage test here, so the pages job may later pickup the created site.
  44. stage: deploy
  45. script:
  46. - cp ./settings-security.xml $HOME/.m2/settings-security.xml
  47. - cp ./settings.xml $HOME/.m2/settings.xml
  48. - mvn -B deploy
  49. only:
  50. - tags
  51. # Archive up the built documentation site.
  52. artifacts:
  53. paths:
  54. - target
  55. image: maven