MCU8QA-162 added new CICD files
rodzic
1b138e2e96
commit
b3eb2c25ef
|
@ -1,6 +1,12 @@
|
||||||
/*/dist/
|
# Untracked files in MPLABX projects
|
||||||
/*/build/
|
/**/build/*
|
||||||
/*/nbproject/private/
|
/**/nbproject/*
|
||||||
/*/nbproject/*.properties
|
!/**/nbproject/*.xml
|
||||||
/*/nbproject/*.mk
|
/**/[Ff]ree/production/*
|
||||||
/*/nbproject/*.bash
|
/**/[Pp]ro/production/*
|
||||||
|
|
||||||
|
# Uncomment these to include hex/elf files
|
||||||
|
#!/**/[Ff]ree/production/*.hex
|
||||||
|
#!/**/[Ff]ree/production/*.elf
|
||||||
|
#!/**/[Pp]ro/production/*.hex
|
||||||
|
#!/**/[Pp]ro/production/*.elf
|
|
@ -0,0 +1,68 @@
|
||||||
|
{
|
||||||
|
"metaDataVersion": "1.0.0",
|
||||||
|
"category": "com.microchip.ide.project",
|
||||||
|
"content": {
|
||||||
|
"metaDataVersion": "1.1.0",
|
||||||
|
"name": "com.microchip.mcu8.mplabx.project.",
|
||||||
|
"version": " ",
|
||||||
|
"displayName": " ",
|
||||||
|
"projectName": "",
|
||||||
|
"shortDescription": "",
|
||||||
|
"ide": {
|
||||||
|
"name": "",
|
||||||
|
"semverRange": ""
|
||||||
|
},
|
||||||
|
"compiler": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"semverRange": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dfp": {
|
||||||
|
"name": "",
|
||||||
|
"semverRange": ""
|
||||||
|
},
|
||||||
|
"configurator": {
|
||||||
|
"name": "",
|
||||||
|
"semverRange": ""
|
||||||
|
},
|
||||||
|
"device": {
|
||||||
|
"metaDataVersion": "1.0.0",
|
||||||
|
"category": "com.microchip.portal.contentRef",
|
||||||
|
"content": {
|
||||||
|
"metaDataVersion": "1.0.0",
|
||||||
|
"category": "com.microchip.device",
|
||||||
|
"name": "",
|
||||||
|
"versionRange": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"subcategories": [
|
||||||
|
"",
|
||||||
|
[
|
||||||
|
"Peripherals", ""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Peripherals", ""
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"peripherals": [
|
||||||
|
"",""
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"additionalData": {
|
||||||
|
"longDescription": {
|
||||||
|
"metaDataVersion": "1.0.0",
|
||||||
|
"category": "com.microchip.portal.fileRef",
|
||||||
|
"content": {
|
||||||
|
"metaDataVersion": "1.0.0",
|
||||||
|
"fileName": "./README.md",
|
||||||
|
"mimeType": "text/markdown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
// Jenkinsfilek8s v1.2.0
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
kubernetes {
|
kubernetes {
|
||||||
|
@ -13,7 +15,8 @@ pipeline {
|
||||||
description: "Email to send build failure and fixed notifications.")
|
description: "Email to send build failure and fixed notifications.")
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
|
GITHUB_OWNER = 'microchip-pic-avr-examples'
|
||||||
GITHUB_URL ='https://github.com/microchip-pic-avr-examples/avr128da48-cnano-adc-temperature-measurement.git'
|
GITHUB_URL ='https://github.com/microchip-pic-avr-examples/avr128da48-cnano-adc-temperature-measurement.git'
|
||||||
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/ebe/avr128da48-cnano-adc-temperature-measurement.git'
|
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/ebe/avr128da48-cnano-adc-temperature-measurement.git'
|
||||||
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
|
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
|
||||||
|
@ -23,7 +26,7 @@ pipeline {
|
||||||
|
|
||||||
options {
|
options {
|
||||||
timestamps()
|
timestamps()
|
||||||
timeout(time: 20, unit: 'MINUTES')
|
timeout(time: 30, unit: 'MINUTES')
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
@ -33,6 +36,17 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('metadata') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
execute("pip install jsonschema")
|
||||||
|
execute("git clone https://bitbucket.microchip.com/scm/citd/metadata-schema.git")
|
||||||
|
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-metadata-validator.git")
|
||||||
|
execute("cd tool-metadata-validator && python metadata-validator.py -data '../.main-meta/main.json' -schema '../metadata-schema/main-schema.json'")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Pre-build') {
|
stage('Pre-build') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
@ -56,7 +70,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy') {
|
stage('GitHub-Deploy') {
|
||||||
when {
|
when {
|
||||||
not {
|
not {
|
||||||
changeRequest()
|
changeRequest()
|
||||||
|
@ -76,8 +90,40 @@ pipeline {
|
||||||
sendSuccessfulGithubDeploymentEmail()
|
sendSuccessfulGithubDeploymentEmail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Portal-Deploy') {
|
||||||
|
when {
|
||||||
|
not {
|
||||||
|
changeRequest()
|
||||||
|
}
|
||||||
|
tag ''
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def metadata = readJSON file:".main-meta/main.json"
|
||||||
|
def version = metadata.content.version
|
||||||
|
def project = metadata.content.projectName
|
||||||
|
|
||||||
|
if(version == env.TAG_NAME) {
|
||||||
|
def cmdArgs = "'{\"repoOwnerName\":\"$env.GITHUB_OWNER\",\"repoName\":\"$project\",\"tagName\":\"$version\"}'"
|
||||||
|
cmdArgs = cmdArgs.replaceAll("\"","\\\\\"")
|
||||||
|
|
||||||
|
execute("git clone https://bitbucket.microchip.com/scm/portal/bundles.git")
|
||||||
|
execute("cd bundles && chmod 755 ./portal-client-cli-linux")
|
||||||
|
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-portal-client-launcher.git")
|
||||||
|
execute("cd tool-portal-client-launcher && node portalLauncher.js -app=../bundles/portal-client-cli-linux -cmd=\"uploadGitHub ${cmdArgs}\"")
|
||||||
|
sendSuccessfulPortalDeploymentEmail()
|
||||||
|
} else {
|
||||||
|
echo "Tag name is not equal to metadata content version."
|
||||||
|
execute("exit 1")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
failure {
|
failure {
|
||||||
|
@ -113,6 +159,12 @@ def sendPipelineFailureEmail () {
|
||||||
|
|
||||||
def sendSuccessfulGithubDeploymentEmail () {
|
def sendSuccessfulGithubDeploymentEmail () {
|
||||||
mail to: "${params.NOTIFICATION_EMAIL}",
|
mail to: "${params.NOTIFICATION_EMAIL}",
|
||||||
subject: "Successful Deployment: ${currentBuild.fullDisplayName}",
|
subject: "Successful Github Deployment: ${currentBuild.fullDisplayName}",
|
||||||
body: "The changes have been successfully deployed to GitHub. ${env.GITHUB_URL}"
|
body: "The changes have been successfully deployed to GitHub. ${env.GITHUB_URL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
def sendSuccessfulPortalDeploymentEmail () {
|
||||||
|
mail to: "${params.NOTIFICATION_EMAIL}",
|
||||||
|
subject: "Successful Portal Deployment: ${currentBuild.fullDisplayName}",
|
||||||
|
body: "The changes have been successfully deployed to Discover Portal."
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: xc8-mplabx
|
- name: xc8-mplabx
|
||||||
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc8-mplabx:2.20-5.40
|
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc8-mplabx:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command: ['cat']
|
command: ['cat']
|
||||||
tty: true
|
tty: true
|
||||||
|
|
Ładowanie…
Reference in New Issue