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.

24 lines
844 B

4 years ago
4 years ago
  1. node {
  2. def mvnHome
  3. stage('Preparation') { // for display purposes
  4. // Get some code from a GitHub repository
  5. // git 'https://gogs.informatik.hs-fulda.de/Continous_Integration_in_der_Praxis/colaboration-training.git'
  6. // Get the Maven tool.
  7. // ** NOTE: This 'M3' Maven tool must be configured
  8. // ** in the global configuration.
  9. mvnHome = tool 'M3'
  10. }
  11. stage('Build') {
  12. // Run the maven build
  13. withEnv(["MVN_HOME=$mvnHome"]) {
  14. if (isUnix()) {
  15. sh '"$MVN_HOME/bin/mvn" -Dmaven.test.failure.ignore clean package'
  16. } else {
  17. bat(/"%MVN_HOME%\bin\mvn" -Dmaven.test.failure.ignore clean package/)
  18. }
  19. }
  20. }
  21. stage('Results') {
  22. // junit '**/target/surefire-reports/TEST-*.xml'
  23. archiveArtifacts 'target/*.jar'
  24. }
  25. }