Create branch to test SONAR

This commit is contained in:
Sanjeev435 2020-06-28 01:59:43 +05:30
parent 03e2c1cbed
commit e6e8915f31
3 changed files with 46 additions and 28 deletions

44
Jenkinsfile vendored
View file

@ -1,30 +1,18 @@
library 'my-pipeline-library' _
#!groovy
properties ([
parameters([
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch to build'),
choice(name: 'RUN_TEST', choices: ['yes', 'no'], description: 'Run test while build'),
booleanParam(name: 'MAIL_TRIGGER', defaultValue: true, description: 'mail to be triggred'),
string(name: 'EMAIL', defaultValue: 'mrcool435@gmail.com', description: 'Mail to be notified')
])
])
//myDeliveryPipeline {
// branch = params.BRANCH
// runTest = params.RUN_TEST
// triggerMail = params.MAIL_TRIGGER
// email = params.EMAIL
//}
myDeliveryPipeline {
branch = params.BRANCH
scmUrl = 'ssh://git@myScmServer.com/repos/myRepo.git'
email = 'team@example.com'
serverPort = '8080'
developmentServer = 'dev-myproject.mycompany.com'
stagingServer = 'staging-myproject.mycompany.com'
productionServer = 'production-myproject.mycompany.com'
pipeline {
agent none
stages {
stage('Maven Install') {
steps {
mvn clean install -Dmaven.test.skip=true
}
}
stage('Run tests') {
agent any
steps {
mvn test
}
}
}
}

30
Jenkinsfile_docker Normal file
View file

@ -0,0 +1,30 @@
library 'my-pipeline-library' _
properties ([
parameters([
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch to build'),
choice(name: 'RUN_TEST', choices: ['yes', 'no'], description: 'Run test while build'),
booleanParam(name: 'MAIL_TRIGGER', defaultValue: true, description: 'mail to be triggred'),
string(name: 'EMAIL', defaultValue: 'mrcool435@gmail.com', description: 'Mail to be notified')
])
])
//myDeliveryPipeline {
// branch = params.BRANCH
// runTest = params.RUN_TEST
// triggerMail = params.MAIL_TRIGGER
// email = params.EMAIL
//}
myDeliveryPipeline {
branch = params.BRANCH
scmUrl = 'ssh://git@myScmServer.com/repos/myRepo.git'
email = 'team@example.com'
serverPort = '8080'
developmentServer = 'dev-myproject.mycompany.com'
stagingServer = 'staging-myproject.mycompany.com'
productionServer = 'production-myproject.mycompany.com'
}