File tree Expand file tree Collapse file tree 2 files changed +58
-154
lines changed Expand file tree Collapse file tree 2 files changed +58
-154
lines changed Original file line number Diff line number Diff line change 1+ // Jenkinsfile v2.0.0
2+ pipeline {
3+ agent {
4+ label ' windows'
5+ }
6+ parameters {
7+ string( name : ' NOTIFICATION_EMAIL' ,
8+ defaultValue : ' PICAVR_Examples_GateKeepers@microchip.com' ,
9+ description : " Email to send build failure and fixed notifications." )
10+ }
11+
12+ environment {
13+ GITHUB_OWNER = ' microchip-pic-avr-examples'
14+ GITHUB_URL = ' https://github.com/microchip-pic-avr-examples/avr128db48-getting-started-with-opamp-studio'
15+ BITBUCKET_URL = ' https://bitbucket.microchip.com/scm/ebe/avr128db48-getting-started-with-opamp-studio.git'
16+ SEMVER_REGEX = ' ^(0|[1-9]\\ d*)+\\ .(0|[1-9]\\ d*)+\\ .(0|[1-9]\\ d*)+$'
17+ ARTIFACTORY_SERVER = ' https://artifacts.microchip.com:7999/artifactory'
18+ }
19+ options {
20+ timestamps()
21+ timeout(time : 30 , unit : ' MINUTES' )
22+ }
23+
24+ stages {
25+ stage(' setup' ) {
26+ steps {
27+ script {
28+ execute(" git clone https://bitbucket.microchip.com/scm/citd/mpae-buildpipeline-groovy-scripts.git" )
29+ def buildPipeline = load (' mpae-buildpipeline-groovy-scripts/studio-buildpipeline.groovy' )
30+ buildPipeline. runStages()
31+ }
32+ }
33+ }
34+ }
35+
36+ post {
37+ failure {
38+ script {
39+ sendPipelineFailureEmail()
40+ }
41+ }
42+ always{
43+ cleanWs()
44+ }
45+ }
46+ }
47+ def execute (String cmd ) {
48+ if (isUnix()) {
49+ sh cmd
50+ } else {
51+ bat cmd
52+ }
53+ }
54+ def sendPipelineFailureEmail () {
55+ mail to : " ${ env.EMAILLIST} ,${ params.NOTIFICATION_EMAIL} " ,
56+ subject : " Failed Pipeline: ${ currentBuild.fullDisplayName} " ,
57+ body : " Pipeline failure. ${ env.BUILD_URL} "
58+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments