Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.29 KB | None | 0 0
  1. pipeline {
  2.     agent any
  3.     tools {
  4.         jdk 'JDK 8'
  5.         maven 'Maven 3.2.5'
  6.     }
  7.     options {
  8.       timeout(time: 10, unit: 'MINUTES')
  9.     }
  10.     stages {
  11.         stage('Parallel'){
  12.             parallel {
  13.                 stage('JobLinux') {
  14.                     agent { label 'linux' }
  15.                     steps {
  16.                         timeout(3) {
  17.                             git branch: 'jenkinsuser4', credentialsId: 'd2079c73-fa0e-430e-b3c7-f1026a21f190', url: 'https://gitlab.com/AravindanM/sample.git'
  18.                             sh 'mvn -f maven-reactor/pom.xml clean package'
  19.                             junit '**/target/surefire-reports/*.xml'
  20.                         }
  21.                     }
  22.                 }
  23.                 stage('JobWindows') {
  24.                     agent { label 'windows' }
  25.                     steps {
  26.                         timeout(3) {
  27.                             git branch: 'jenkinsuser4', credentialsId: 'd2079c73-fa0e-430e-b3c7-f1026a21f190', url: 'https://gitlab.com/AravindanM/sample.git'
  28.                             bat 'mvn -f maven-reactor/pom.xml clean package'
  29.                             junit '**/target/surefire-reports/*.xml'
  30.                         }
  31.                     }
  32.                 }
  33.             }  
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement