Skip to content

Commit 4b2fcee

Browse files
committed
Template/example mandatory files
1 parent fd4e5b7 commit 4b2fcee

File tree

6 files changed

+203
-0
lines changed

6 files changed

+203
-0
lines changed

.citd/Jenkinsfilek8s

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
pipeline {
2+
agent {
3+
kubernetes {
4+
label 'github_deployment'
5+
defaultContainer 'xc16-mplabx-sonar-fmpp-python'
6+
yamlFile '.citd/cloudprovider.yml'
7+
}
8+
}
9+
10+
11+
environment {
12+
NOTIFICATION_EMAIL = '[email protected]'
13+
//Update this URL based on where(which organization) it needs to be deployed
14+
GITHUB_URL ='https://github.com/mchpTestArea'
15+
//This is the BitBucket repo URL which we want to deploy
16+
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/pic24f-hello-world-uart.git'
17+
GITHUB_CREDENTIAL_ID = 'GITHUB_PIC_AVR_TEST_TOKEN'
18+
CHANGE_LOG_PATH = 'changelog.md'
19+
SOURCE_PROJECT_META_DATA = '.main-meta/main.json'
20+
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
21+
}
22+
23+
options {
24+
timestamps()
25+
timeout(time: 20, unit: 'MINUTES')
26+
}
27+
28+
stages {
29+
30+
stage('Checkout') {
31+
steps {
32+
checkout scm
33+
}
34+
}
35+
36+
stage('Build') {
37+
steps {
38+
script {
39+
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-mplabx-c-build.git")
40+
execute("cd ./tool-mplabx-c-build && node buildLauncher.js sp=../ rp=./output genMK=true")
41+
}
42+
}
43+
}
44+
45+
// Cloning the tool used for GitHub deployment
46+
stage('GitHub tool clone'){
47+
steps{
48+
script{
49+
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git")
50+
execute("chmod +x ./tool-github-deploy/tool-github-deploy/tool-github-deploy.py")
51+
}
52+
}
53+
}
54+
55+
}
56+
57+
post {
58+
success{
59+
script {
60+
if (!"${env.CHANGE_AUTHOR_EMAIL}".equalsIgnoreCase("null")) {
61+
archiveArtifacts artifacts: "tool-mplabx-c-build/output/**", fingerprint: true
62+
mail to: "${env.CHANGE_AUTHOR_EMAIL}, ${env.NOTIFICATION_EMAIL}",
63+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
64+
body: "Something is right with ${env.BUILD_URL}"
65+
} else {
66+
archiveArtifacts artifacts: "tool-mplabx-c-build/output/**", fingerprint: true
67+
mail to: "${env.NOTIFICATION_EMAIL}",
68+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
69+
body: "Something is right with ${env.BUILD_URL}"
70+
}
71+
}
72+
}
73+
failure {
74+
script {
75+
if (!"${env.CHANGE_AUTHOR_EMAIL}".equalsIgnoreCase("null")) {
76+
archiveArtifacts artifacts: "tool-mplabx-c-build/output/**", fingerprint: true
77+
mail to: "${env.CHANGE_AUTHOR_EMAIL}, ${env.NOTIFICATION_EMAIL}",
78+
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
79+
body: "Pipeline failure. ${env.BUILD_URL}"
80+
} else {
81+
archiveArtifacts artifacts: "tool-mplabx-c-build/output/**", fingerprint: true
82+
mail to: "${env.NOTIFICATION_EMAIL}",
83+
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
84+
body: "Pipeline failure. ${env.BUILD_URL}"
85+
}
86+
}
87+
}
88+
}
89+
}
90+
91+
def execute(String command) {
92+
if (isUnix()) {
93+
sh command
94+
} else {
95+
bat command
96+
}
97+
}
98+
99+
String readJsonObject() {
100+
def jsonObj = readJSON interpolate: true, file: "${env.SOURCE_PROJECT_META_DATA}"
101+
return jsonObj
102+
}

.citd/cloudprovider.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: xc16-mplabx-sonar-fmpp-python
5+
spec:
6+
containers:
7+
- name: xc16-mplabx-sonar-fmpp-python
8+
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc16-mplabx-sonar-fmpp-python-yarn-node:1.50-5.40-4.2-0.9.16-3.x-1.17.3-12.x
9+
imagePullPolicy: Always
10+
command: ['cat']
11+
tty: true
12+
resources:
13+
requests:
14+
cpu: 1
15+
memory: 1Gi
16+
limits:
17+
cpu: 2
18+
memory: 2Gi

.main-meta/main.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"metaDataVersion": "1.0.0",
3+
"category": "com.microchip.ide.project",
4+
"content": {
5+
"metaDataVersion": "1.0.0",
6+
"name": "com.microchip.mplabx.project.project",
7+
"version": "1.0.0",
8+
"displayName": "PIC24F Hello World",
9+
"projectName": "pic24f-hello-world-uart",
10+
"shortDescription": "PIC24F Hello World Example",
11+
"ide": {
12+
"name": "MPLABX",
13+
"semverRange": ">=5.35.0"
14+
},
15+
"compiler": {
16+
"name": "XC16",
17+
"semverRange": "^1.50.0"
18+
},
19+
"dfp": {
20+
"name": "PIC24F-GA-GB_DFP",
21+
"semverRange": "^1.0.41"
22+
},
23+
"device": {
24+
"metaDataVersion": "1.0.0",
25+
"category": "com.microchip.portal.contentRef",
26+
"content": {
27+
"metaDataVersion": "1.0.0",
28+
"category": "com.microchip.device",
29+
"name": "PIC24FJ1024GB610",
30+
"versionRange": "*"
31+
}
32+
},
33+
"subcategories":[
34+
"Hello World",
35+
[
36+
"Peripherals",
37+
"GPIO",
38+
"UART"
39+
]
40+
],
41+
"peripherals": [
42+
"GPIO",
43+
"UART"
44+
],
45+
"keywords": [
46+
"GPIO",
47+
"UART"
48+
]
49+
}
50+
}

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Product name release version Ex: pic24f-hello-worl-uart release v1.0.0
2+
### Release Highlights
3+
4+
5+
6+
### Features Added\Updated
7+

license.md

Whitespace-only changes.

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Repo or Project Name
2+
3+
Image of the board if any
4+
5+
## Summary
6+
7+
8+
## Related Documentation
9+
10+
11+
12+
## Software Used
13+
14+
15+
16+
## Hardware Used
17+
18+
19+
20+
## Setup
21+
22+
23+
24+
## Operation
25+
26+

0 commit comments

Comments
 (0)