Skip to content

Commit 2e40340

Browse files
Aman HebbaleAman Hebbale
Aman Hebbale
authored and
Aman Hebbale
committed
MCU8QA-498 added new CICD files
1 parent 4d31a50 commit 2e40340

File tree

3 files changed

+63
-174
lines changed

3 files changed

+63
-174
lines changed

.citd/Jenkinsfilek8s

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

cloudprovider.yml .citd/cloudprovider.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ spec:
1111
tty: true
1212
resources:
1313
requests:
14-
cpu: 1
15-
memory: 4Gi
14+
cpu: 0.25
15+
memory: 500Mi
1616
limits:
17-
cpu: 2
18-
memory: 8Gi
17+
cpu: 0.5
18+
memory: 750Mi

Jenkinsfilek8s

-170
This file was deleted.

0 commit comments

Comments
 (0)