Skip to content

Commit fc23e9e

Browse files
Aman HebbaleAman Hebbale
authored andcommitted
MCU8QA-498 added new CICD files
1 parent f33dd69 commit fc23e9e

File tree

2 files changed

+58
-154
lines changed

2 files changed

+58
-154
lines changed

.citd/Jenkinsfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
}

Jenkinsfile

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)