Skip to content

Commit 1f5c145

Browse files
committed
Pull request #8: Develop
Merge in MCU16CE/dspic-bootloader-mdfu from develop to main * commit '46606c129cdb74df68d11c61ae69c826bfcb402e': Whitespace change to re-start build Fix P-384 linking Fix broken links Fix invalid marketing terms Add chmod to build scripts for .sh files Move demos to external staging repo Updated with Roy's PR feedback. Use vanity URL rather than longer MDFU URL Update outer readme and changelog Ensure names are unique Try to resolve build issue Fix dsPIC name and add demo main.json files Update outer main.json: Initial commit
2 parents 76b171c + 46606c1 commit 1f5c145

File tree

641 files changed

+105404
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

641 files changed

+105404
-8
lines changed

.citd/Jenkinsfilek8s

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
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 'dspic-bootloader-mdfu-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 = '1f1319de.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/dspic-bootloader-mdfu.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,.mchp_private,sandbox,.sandbox'
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 = "main"
35+
/*When using the main.json schema version 1.3.0 or higher, the PORTAL will first reject registration attempt when an unapproved keyword is found, but can be forced to accept.
36+
This argument is used to provide the list of unapproved keywords (also listed in main.json) which the deployment script will force the PORTAL to accept.*/
37+
UNAPPROVED_KEYWORDS_OVERRIDE_LIST="NONE"
38+
39+
/*
40+
GitHub Page Stage Information
41+
List of GitHub Page Options:
42+
----------------------------
43+
1. GITHUB_PAGES_NONE ( Branch: None, index file path: None )
44+
2. GITHUB_PAGES_MASTER_ROOT ( Branch: Master, index file path: /root )
45+
3. GITHUB_PAGES_MASTER_DOCS ( Branch: Master, index file path: /Docs )
46+
4. GITHUB_PAGES_DEVELOP_ROOT ( Branch: Develop, index file path: /root )
47+
5. GITHUB_PAGES_DEVELOP_DOCS ( Branch: Develop, index file path: /Docs )
48+
*/
49+
GITHUB_PAGES = 'GITHUB_PAGES_NONE'
50+
51+
/*
52+
Project Build Stage Information
53+
*/
54+
MPLABX_PROJECT_SOURCE = "../"
55+
}
56+
57+
triggers {
58+
cron(env.BRANCH_NAME == 'develop' ? 'H H 1 * *': '')
59+
}
60+
61+
options {
62+
timestamps()
63+
timeout(time: 30, unit: 'MINUTES')
64+
}
65+
66+
stages {
67+
stage('Checkout') {
68+
steps {
69+
checkout scm
70+
}
71+
}
72+
73+
stage('project config update') {
74+
steps {
75+
script {
76+
mplabxProjectConfigUpdate(
77+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}",
78+
dfpUpdate: false,
79+
dfpInternal: false
80+
)
81+
}
82+
}
83+
}
84+
85+
stage('Build') {
86+
steps {
87+
script {
88+
sh("find . -type f -name postBuild.sh -exec chmod +x {} \\;")
89+
sh("find . -type f -name preBuild.sh -exec chmod +x {} \\;")
90+
mplabxProjectBuild(
91+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
92+
)
93+
}
94+
}
95+
}
96+
97+
98+
//MisraCheck code analysis
99+
stage('MISRA Check') {
100+
steps {
101+
script {
102+
misraCheck(
103+
sourceProjectPath: "${env.MPLABX_PROJECT_SOURCE}"
104+
)
105+
}
106+
}
107+
}
108+
109+
// Validate main.json file
110+
stage('Validate main.json') {
111+
steps {
112+
script {
113+
validateMetaData(
114+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
115+
)
116+
}
117+
}
118+
}
119+
120+
stage('MetaDataContent Version Validation') {
121+
steps {
122+
script {
123+
validateMetaDataContentVersion(
124+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
125+
githubOrganization: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
126+
)
127+
}
128+
}
129+
}
130+
131+
// Creating tag in Bitbucket repo
132+
stage('Bitbucket Tag Creation') {
133+
when {
134+
anyOf {
135+
allOf {
136+
not { changeRequest() }
137+
anyOf {branch 'master'; branch 'main';}
138+
}
139+
}
140+
}
141+
142+
steps {
143+
script {
144+
bitbucketTagCreation()
145+
}
146+
}
147+
}
148+
149+
stage('Doxygen files generation') {
150+
when {
151+
anyOf {
152+
allOf {
153+
not { changeRequest() }
154+
}
155+
}
156+
}
157+
steps {
158+
container('buildtools') {
159+
script {
160+
doxygen()
161+
}
162+
}
163+
}
164+
}
165+
166+
// GitHub repo creation
167+
stage('GitHub Repo Creation') {
168+
when {
169+
anyOf {
170+
allOf {
171+
not { changeRequest() }
172+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
173+
}
174+
}
175+
}
176+
177+
steps {
178+
script {
179+
githubRepoCreate(
180+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
181+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
182+
)
183+
}
184+
}
185+
}
186+
187+
// Deploying the code to GitHub
188+
stage('GitHub Deploy Source') {
189+
when {
190+
anyOf {
191+
allOf {
192+
not { changeRequest() }
193+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
194+
}
195+
}
196+
}
197+
198+
steps {
199+
script {
200+
githubDeploySource(
201+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
202+
deployBranchList: "${env.DEPLOY_BRANCH_LIST}",
203+
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}",
204+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
205+
)
206+
}
207+
}
208+
}
209+
210+
// Creating GitHub release
211+
stage('GitHub release') {
212+
when {
213+
anyOf {
214+
allOf {
215+
not { changeRequest() }
216+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
217+
}
218+
}
219+
}
220+
221+
steps {
222+
script {
223+
githubReleaseCreate(
224+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
225+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
226+
)
227+
}
228+
}
229+
}
230+
231+
// Creating GitHub Page
232+
stage('GitHub Page Create') {
233+
when {
234+
anyOf {
235+
allOf {
236+
not { changeRequest() }
237+
anyOf {branch 'master'; branch 'main';}
238+
}
239+
}
240+
}
241+
242+
steps {
243+
script {
244+
githubPageCreate(
245+
githubPage: "${env.GITHUB_PAGES}",
246+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
247+
)
248+
}
249+
}
250+
}
251+
252+
//Deploying the Github content to portal
253+
stage('Portal-Deploy') {
254+
when {
255+
allOf {
256+
not { changeRequest() }
257+
anyOf {branch 'master'; branch 'main';}
258+
}
259+
}
260+
steps {
261+
script {
262+
portalDeploy(
263+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
264+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
265+
)
266+
}
267+
}
268+
}
269+
}
270+
271+
post {
272+
success{
273+
script {
274+
sendMail(
275+
mailId: "${env.NOTIFICATION_EMAIL}",
276+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
277+
body: "Something is right with ${env.BUILD_URL}"
278+
)
279+
}
280+
}
281+
failure {
282+
script {
283+
sendMail(
284+
mailId: "${env.NOTIFICATION_EMAIL}",
285+
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}",
286+
body: "Something is right with ${env.BUILD_URL}"
287+
)
288+
}
289+
}
290+
}
291+
}

.citd/cloudprovider.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: 500m
15+
memory: 1500Mi
16+
limits:
17+
cpu: 1
18+
memory: 2Gi
19+
- name: buildtools
20+
image: artifacts.microchip.com:7999/microchip/buildtools/doxygen:1.8.15-r0
21+
imagePullPolicy: Always
22+
command: ['cat']
23+
tty: true
24+
resources:
25+
requests:
26+
cpu: 500m
27+
memory: 250Mi
28+
limits:
29+
cpu: 1
30+
memory: 500Mi

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
# Excluding object files
8+
*.o
9+
*.ko
10+
*.obj
11+
*.elf
12+
13+
# Excluding documentation output directories
14+
#docs/
15+
16+
# Excluding any executables
17+
*.exe
18+
19+
#Excluding Files/Folders Auto-Generated by Test Harness
20+
.generated_files/
21+
22+
# Excluding Netbeans specific build directories and file types
23+
~*.*
24+
.generated_files/
25+
nbproject/build/
26+
nbproject/dist/
27+
nbproject/private/
28+
nbproject/disassembly/
29+
build/
30+
dist/
31+
private/
32+
disassembly/
33+
*.zip
34+
!code-templates.zip
35+
*.mk
36+
*.bash
37+
*.dump
38+
Makefile-genesis.properties
39+
40+
# Excluding MPLAB X® Trace files
41+
*.log
42+
*.inx
43+
44+
# KDE specific
45+
.directory
46+
47+
# Misc
48+
.svn
49+
*.bak
50+
*.doc
51+
*.docx
52+
53+
54+

0 commit comments

Comments
 (0)