Skip to content

Commit bc21a66

Browse files
committed
Initial commit
1 parent b65e78f commit bc21a66

File tree

8 files changed

+362
-1
lines changed

8 files changed

+362
-1
lines changed

.citd/Jenkinsfilek8s

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
/*
2+
Jenkins Shared Library:
3+
----------------------
4+
shared-library-mcu16ce - https://bitbucket.microchip.com/scm/citd/shared-library-mcu16ce.git
5+
shared-library-common - https://bitbucket.microchip.com/scm/citd/shared-library-common.git
6+
*/
7+
@Library(['shared-library-mcu16ce@master', 'shared-library-common@master']) _
8+
9+
pipeline {
10+
agent {
11+
kubernetes {
12+
inheritFrom 'pic24-dspic-can-canfd-bootloader-github-deployment'
13+
defaultContainer 'xc16-mplabx-sonar-fmpp-python'
14+
yamlFile '.citd/cloudprovider.yml'
15+
}
16+
}
17+
18+
environment {
19+
/*
20+
Common Information
21+
*/
22+
NOTIFICATION_EMAIL = 'e50beea8.microchip.com@amer.teams.ms'
23+
// GitHub production organization name
24+
GITHUB_PRODUCTION_ORGANIZATION = "microchip-pic-avr-examples"
25+
26+
/*
27+
GitHub Deploy Stage Information
28+
*/
29+
//This is the BitBucket source repo URL to be deployed
30+
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/pic24-dspic-can-canfd-bootloader.git'
31+
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator
32+
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private'
33+
//Branch(s) to be deployed, if multiple branches use comma separator. DEPLOY_BRANCH_LIST is the target branch of the PR.
34+
DEPLOY_BRANCH_LIST = "master"
35+
36+
/*
37+
GitHub Page Stage Information
38+
List of GitHub Page Options:
39+
----------------------------
40+
1. GITHUB_PAGES_NONE ( Branch: None, index file path: None )
41+
2. GITHUB_PAGES_MASTER_ROOT ( Branch: Master, index file path: /root )
42+
3. GITHUB_PAGES_MASTER_DOCS ( Branch: Master, index file path: /Docs )
43+
4. GITHUB_PAGES_DEVELOP_ROOT ( Branch: Develop, index file path: /root )
44+
5. GITHUB_PAGES_DEVELOP_DOCS ( Branch: Develop, index file path: /Docs )
45+
*/
46+
GITHUB_PAGES = 'GITHUB_PAGES_MASTER_ROOT'
47+
48+
/*
49+
Project Build Stage Information
50+
*/
51+
MPLABX_PROJECT_SOURCE = "../"
52+
}
53+
54+
options {
55+
timestamps()
56+
timeout(time: 20, unit: 'MINUTES')
57+
}
58+
59+
stages {
60+
stage('Checkout') {
61+
steps {
62+
checkout scm
63+
}
64+
}
65+
66+
stage('project config update') {
67+
steps {
68+
script {
69+
mplabxProjectConfigUpdate(
70+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
71+
)
72+
}
73+
}
74+
}
75+
76+
stage('Build') {
77+
steps {
78+
script {
79+
mplabxProjectBuild(
80+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
81+
)
82+
}
83+
}
84+
}
85+
86+
// Validate main.json file
87+
stage('Validate main.json') {
88+
steps {
89+
script {
90+
validateMetaData()
91+
}
92+
}
93+
}
94+
95+
// Creating tag in Bitbucket repo
96+
stage('Bitbucket Tag Creation') {
97+
when {
98+
anyOf {
99+
allOf {
100+
not { changeRequest() }
101+
anyOf {branch 'master';}
102+
}
103+
}
104+
}
105+
106+
steps {
107+
script {
108+
bitbucketTagCreation()
109+
}
110+
}
111+
}
112+
113+
// GitHub repo creation
114+
stage('GitHub Repo Creation') {
115+
when {
116+
anyOf {
117+
allOf {
118+
not { changeRequest() }
119+
}
120+
}
121+
}
122+
123+
steps {
124+
script {
125+
githubRepoCreate(
126+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
127+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
128+
)
129+
}
130+
}
131+
}
132+
133+
// Deploying the code to GitHub
134+
stage('GitHub Deploy Source') {
135+
when {
136+
anyOf {
137+
allOf {
138+
not { changeRequest() }
139+
}
140+
}
141+
}
142+
143+
steps {
144+
script {
145+
githubDeploySource(
146+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
147+
deployBranchList: "${env.DEPLOY_BRANCH_LIST}",
148+
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}",
149+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
150+
)
151+
}
152+
}
153+
}
154+
155+
// Creating GitHub release
156+
stage('GitHub release') {
157+
when {
158+
anyOf {
159+
allOf {
160+
not { changeRequest() }
161+
}
162+
}
163+
}
164+
165+
steps {
166+
script {
167+
githubReleaseCreate(
168+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
169+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
170+
)
171+
}
172+
}
173+
}
174+
175+
// Creating GitHub Page
176+
stage('GitHub Page Create') {
177+
when {
178+
anyOf {
179+
allOf {
180+
not { changeRequest() }
181+
anyOf {branch 'master';}
182+
}
183+
}
184+
}
185+
186+
steps {
187+
script {
188+
githubPageCreate(
189+
githubPage: "${env.GITHUB_PAGES}",
190+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
191+
)
192+
}
193+
}
194+
}
195+
196+
//Deploying the Github content to portal
197+
stage('Portal-Deploy') {
198+
when {
199+
allOf {
200+
not { changeRequest() }
201+
anyOf {branch 'master';}
202+
}
203+
}
204+
steps {
205+
script {
206+
portalDeploy(
207+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
208+
)
209+
}
210+
}
211+
}
212+
}
213+
214+
post {
215+
success{
216+
script {
217+
sendMail(
218+
mailId: "${env.NOTIFICATION_EMAIL}",
219+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
220+
body: "Something is right with ${env.BUILD_URL}"
221+
)
222+
}
223+
}
224+
failure {
225+
script {
226+
sendMail(
227+
mailId: "${env.NOTIFICATION_EMAIL}",
228+
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}",
229+
body: "Something is right with ${env.BUILD_URL}"
230+
)
231+
}
232+
}
233+
}
234+
}

.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:latest
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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.pic24-dspic-can-canfd-bootloader",
7+
"version":"x.x.x",
8+
"displayName":"xxxxxxxxxxxxxxx",
9+
"projectName":"pic24-dspic-can-canfd-bootloader",
10+
"shortDescription":"xxxxxxxxxxxxxxx",
11+
"ide":{
12+
"name":"MPLABX",
13+
"semverRange":">=5.40.0"
14+
},
15+
"compiler":{
16+
"name":"XC16",
17+
"semverRange":"^1.50.0"
18+
},
19+
"dfp":{
20+
"name":"xxxxxxxxxxxxxxx",
21+
"semverRange":">=x.x.x"
22+
},
23+
"configurator": {
24+
"name": "MCC",
25+
"semverRange": ">=4.0.1"
26+
},
27+
"device":{
28+
"metaDataVersion":"1.0.0",
29+
"category":"com.microchip.portal.contentRef",
30+
"content":{
31+
"metaDataVersion":"1.0.0",
32+
"category":"com.microchip.device",
33+
"name":"xxxxxxxxxxxxxxx",
34+
"versionRange":"*"
35+
}
36+
},
37+
"peripherals":[
38+
"DMA",
39+
"CAN"
40+
],
41+
"keywords":[
42+
"DMA",
43+
"Sensor"
44+
]
45+
}
46+
}

LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
© [2020] Microchip Technology Inc. and its subsidiaries
2+
3+
Subject to your compliance with these terms, you may use this Microchip software and any derivatives exclusively with Microchip products. You are responsible
4+
for complying with third party license terms applicable to your use of third party software (including open source software) that may accompany this Microchip
5+
software. SOFTWARE IS “AS IS.” NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
6+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS,
7+
DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
8+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP’S TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY, YOU
9+
PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![image](images/microchip.jpg)
22

3-
## %repoDescritpion%
3+
## PIC24 DSPIC CAN CANFD BOOTLOADER
44

55
Board Image if any.
66

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Project Name or repo name release version(ex: v1.0.0)
2+
### Release Highlights
3+
4+
5+
6+
### Features Added\Updated
7+
8+
9+

gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# .gitignore file
2+
#
3+
# Set up for Microchip/MPLAB X® development
4+
#
5+
# Default gitignore files for code examples, only removing/ignoring usual MPLAB X® clutter
6+
7+
# Exluding object files
8+
*.o
9+
*.ko
10+
*.obj
11+
*.elf
12+
13+
# Excluding any executables
14+
*.exe
15+
16+
# Excluding Netbeans specific build directories and file types
17+
~*.*
18+
nbproject/build/
19+
nbproject/dist/
20+
nbproject/private/
21+
nbproject/disassembly/
22+
build/
23+
dist/
24+
private/
25+
disassembly/
26+
*.zip
27+
*.mk
28+
*.bash
29+
Makefile-genesis.properties
30+
31+
# Excluding MPLAB X® Trace files
32+
*.log
33+
*.inx
34+
35+
# KDE specific
36+
.directory
37+
38+
# Misc
39+
.svn
40+
*.bak
41+
*.doc
42+
*.docx
43+
44+
45+

images/microchip.jpg

6.71 KB
Loading

0 commit comments

Comments
 (0)