-
Notifications
You must be signed in to change notification settings - Fork 1
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
Aman Hebbale
authored and
Aman Hebbale
committed
Apr 5, 2021
1 parent
1a6487e
commit 7b0074b
Showing
2 changed files
with
58 additions
and
154 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,58 @@ | ||
// Jenkinsfile v2.0.0 | ||
pipeline { | ||
agent { | ||
label 'windows' | ||
} | ||
parameters { | ||
string( name: 'NOTIFICATION_EMAIL', | ||
defaultValue: 'PICAVR_Examples_GateKeepers@microchip.com', | ||
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/avr128db48-getting-started-with-mvio' | ||
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/ebe/avr128db48-getting-started-with-mvio.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/studio-buildpipeline.groovy') | ||
buildPipeline.runStages() | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
failure { | ||
script { | ||
sendPipelineFailureEmail() | ||
} | ||
} | ||
always{ | ||
cleanWs() | ||
} | ||
} | ||
} | ||
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 was deleted.
Oops, something went wrong.