1 Star 0 Fork 0

microchip-pic-avr-examples / pic18f47q10-cnano-tmr2-one-shot-reset-bare

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Jenkinsfilek8s 3.75 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
Marius Nicolae 提交于 2020-03-26 15:18 . MPAE-2186 add support files
pipeline {
agent {
kubernetes {
label 'pic18f47q10-cnano-tmr2-one-shot-reset-bare'
defaultContainer 'xc8-mplabx'
yamlFile 'cloudprovider.yml'
}
}
parameters {
string( name: 'NOTIFICATION_EMAIL',
defaultValue: 'Marc.McComb@microchip.com, \
Mamun.Ahmed@microchip.com, \
stephen.cowden@microchip.com, \
michael.pearce@microchip.com, \
Vinaya.Skanda@Microchip.com, \
Johan.Lofstad@microchip.com, \
Espen.Krangnes@microchip.com, \
Catalina.Costin@microchip.com, \
Namrata.Dalvi@microchip.com, \
Martin.Thomaz@microchip.com, \
Marius.Nicolae@microchip.com, \
Cristian.Pop@microchip.com, \
shaima.husain@microchip.com, \
prasad.aradhya@microchip.com',
description: "Email to send build failure, fixed and successful deployment notifications.")
}
environment {
GITHUB_URL ='https://github.com/microchip-pic-avr-examples/pic18f47q10-cnano-tmr2-one-shot-reset-bare.git'
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/ebe/pic18f47q10-cnano-tmr2-one-shot-reset-bare.git'
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
DEPLOY_SCRIPT_DIR = 'tool-github-deploy'
DEPLOY_SCRIPT_FILE = 'deploy-source-as-is.sh'
}
options {
timestamps()
timeout(time: 20, unit: 'MINUTES')
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-mplabx-c-build.git")
execute("cd tool-mplabx-c-build && node buildLauncher.js sp=../ rp=./output genMK=true")
}
}
}
stage('Deploy') {
when {
not {
changeRequest()
}
anyOf {
tag ''
}
}
steps {
script {
execute("git clone ${env.DEPLOY_TOOL_URL}")
withCredentials([usernamePassword(credentialsId: '8bit-examples.github.com', usernameVariable: 'USER_NAME', passwordVariable:'USER_PASS' )]) {
execute("cd ${env.DEPLOY_SCRIPT_DIR} && bash ${env.DEPLOY_SCRIPT_FILE} ${env.BITBUCKET_URL} ${env.GITHUB_URL} ${USER_NAME} ${USER_PASS} '--tag ${env.TAG_NAME}'")
}
sendSuccessfulGithubDeploymentEmail()
}
}
}
}
post {
failure {
script {
sendPipelineFailureEmail()
}
}
always {
archiveArtifacts artifacts: "tool-mplabx-c-build/output/**", allowEmptyArchive: true, fingerprint: true
}
}
}
def execute(String cmd) {
if(isUnix()) {
sh cmd
} else {
bat cmd
}
}
def sendPipelineFailureEmail () {
if (!"${env.CHANGE_AUTHOR_EMAIL}".equalsIgnoreCase("null")) {
mail to: "${env.CHANGE_AUTHOR_EMAIL}, ${params.NOTIFICATION_EMAIL}",
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Pipeline failure. ${env.BUILD_URL}"
} else {
mail to: "${params.NOTIFICATION_EMAIL}",
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Pipeline failure. ${env.BUILD_URL}"
}
}
def sendSuccessfulGithubDeploymentEmail () {
mail to: "${params.NOTIFICATION_EMAIL}",
subject: "Successful Deployment: ${currentBuild.fullDisplayName}",
body: "The changes have been successfully deployed to GitHub. ${env.GITHUB_URL}"
}
C
1
https://gitee.com/microchip-pic-avr-examples/pic18f47q10-cnano-tmr2-one-shot-reset-bare.git
git@gitee.com:microchip-pic-avr-examples/pic18f47q10-cnano-tmr2-one-shot-reset-bare.git
microchip-pic-avr-examples
pic18f47q10-cnano-tmr2-one-shot-reset-bare
pic18f47q10-cnano-tmr2-one-shot-reset-bare
master

搜索帮助

14c37bed 8189591 565d56ea 8189591