-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50548cf
commit f404f8c
Showing
3 changed files
with
78 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Jenkinsfile v2.0.0 | ||
|
||
pipeline { | ||
agent { | ||
kubernetes { | ||
|
||
defaultContainer 'xc8-mplabx' | ||
yamlFile '.citd/cloudprovider.yml' | ||
} | ||
} | ||
parameters { | ||
string( name: 'NOTIFICATION_EMAIL', | ||
defaultValue: '[email protected]', | ||
description: "Email to send build failure and fixed notifications.") | ||
} | ||
|
||
environment { | ||
GITHUB_OWNER = 'microchip-pic-avr-examples' | ||
GITHUB_URL ='https://github.com/microchip-pic-avr-examples/avr16eb32-getting-started-with-tcf-mplab-mcc' | ||
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/ebe/avr16eb32-getting-started-with-tcf-mplab-mcc.git' | ||
SEMVER_REGEX = '^(0|[1-9]\\d*)+\\.(0|[1-9]\\d*)+\\.(0|[1-9]\\d*)+$' | ||
ARTIFACTORY_SERVER = 'https://artifacts.microchip.com:7999/artifactory' | ||
} | ||
options { | ||
timestamps() | ||
timeout(time: 30, unit: 'MINUTES') | ||
} | ||
|
||
stages { | ||
stage('setup') { | ||
steps { | ||
script { | ||
execute("git clone https://bitbucket.microchip.com/scm/citd/mpae-buildpipeline-groovy-scripts.git") | ||
def buildPipeline = load ('mpae-buildpipeline-groovy-scripts/xc8mplabx-buildpipeline.groovy') | ||
buildPipeline.runStages() | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
failure { | ||
script { | ||
sendPipelineFailureEmail() | ||
} | ||
} | ||
} | ||
} | ||
def execute(String cmd) { | ||
if(isUnix()) { | ||
sh cmd | ||
} else { | ||
bat cmd | ||
} | ||
} | ||
def sendPipelineFailureEmail() { | ||
mail to: "${env.EMAILLIST},${params.NOTIFICATION_EMAIL}", | ||
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", | ||
body: "Pipeline failure. ${env.BUILD_URL}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: xc8-mplabx | ||
spec: | ||
containers: | ||
- name: xc8-mplabx | ||
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc8-mplabx:latest | ||
imagePullPolicy: Always | ||
command: ['cat'] | ||
tty: true | ||
resources: | ||
requests: | ||
cpu: 0.25 | ||
memory: 500Mi | ||
limits: | ||
cpu: 0.5 | ||
memory: 750Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters