Skip to content

Commit 2720e87

Browse files
i64056i64056
authored andcommitted
MCU8QA-3960 added new CICD files
1 parent 55b618f commit 2720e87

File tree

3 files changed

+64
-174
lines changed

3 files changed

+64
-174
lines changed

.citd/Jenkinsfilek8s

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

cloudprovider.yml renamed to .citd/cloudprovider.yml

Lines changed: 4 additions & 4 deletions
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

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

0 commit comments

Comments
 (0)