Skip to content

Commit 170b066

Browse files
committed
Pull request #9: Public release of dsPIC33A dual partition demo.
Merge in MCU16CE/dspic33a-dual-partition-code-examples from develop to main * commit 'fdc31bf84ce7aabb0fb3657e97b8b3f9da43dc33': Revert "trying to resolve build test deployment issue." trying to resolve build test deployment issue. Update to new project folder name. Add description of lab_instructions rename project folders to include .X rename folders. move files to top level. Add in keywords Update config bits to non-rc version Add intro Fix version number: Move to new repo Initial commit
2 parents 0507918 + fdc31bf commit 170b066

File tree

195 files changed

+11362
-10
lines changed

Some content is hidden

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

195 files changed

+11362
-10
lines changed

.citd/Jenkinsfilek8s

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
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 'dspic33a-dual-partition-code-examples-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 = '[email protected]'
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/dspic33a-dual-partition-code-examples.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+
mplabxProjectBuild(
89+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
90+
)
91+
}
92+
}
93+
}
94+
95+
96+
//MisraCheck code analysis
97+
stage('MISRA Check') {
98+
steps {
99+
script {
100+
misraCheck(
101+
sourceProjectPath: "${env.MPLABX_PROJECT_SOURCE}"
102+
)
103+
}
104+
}
105+
}
106+
107+
// Validate main.json file
108+
stage('Validate main.json') {
109+
steps {
110+
script {
111+
validateMetaData(
112+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
113+
)
114+
}
115+
}
116+
}
117+
118+
stage('MetaDataContent Version Validation') {
119+
steps {
120+
script {
121+
validateMetaDataContentVersion(
122+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
123+
githubOrganization: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
124+
)
125+
}
126+
}
127+
}
128+
129+
// Creating tag in Bitbucket repo
130+
stage('Bitbucket Tag Creation') {
131+
when {
132+
anyOf {
133+
allOf {
134+
not { changeRequest() }
135+
anyOf {branch 'master'; branch 'main';}
136+
}
137+
}
138+
}
139+
140+
steps {
141+
script {
142+
bitbucketTagCreation()
143+
}
144+
}
145+
}
146+
147+
stage('Doxygen files generation') {
148+
when {
149+
anyOf {
150+
allOf {
151+
not { changeRequest() }
152+
}
153+
}
154+
}
155+
steps {
156+
container('buildtools') {
157+
script {
158+
doxygen()
159+
}
160+
}
161+
}
162+
}
163+
164+
// GitHub repo creation
165+
stage('GitHub Repo Creation') {
166+
when {
167+
anyOf {
168+
allOf {
169+
not { changeRequest() }
170+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
171+
}
172+
}
173+
}
174+
175+
steps {
176+
script {
177+
githubRepoCreate(
178+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
179+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
180+
)
181+
}
182+
}
183+
}
184+
185+
// Deploying the code to GitHub
186+
stage('GitHub Deploy Source') {
187+
when {
188+
anyOf {
189+
allOf {
190+
not { changeRequest() }
191+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
192+
}
193+
}
194+
}
195+
196+
steps {
197+
script {
198+
githubDeploySource(
199+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
200+
deployBranchList: "${env.DEPLOY_BRANCH_LIST}",
201+
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}",
202+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
203+
)
204+
}
205+
}
206+
}
207+
208+
// Creating GitHub release
209+
stage('GitHub release') {
210+
when {
211+
anyOf {
212+
allOf {
213+
not { changeRequest() }
214+
anyOf {branch 'master'; branch 'main'; branch 'test_deploy';}
215+
}
216+
}
217+
}
218+
219+
steps {
220+
script {
221+
githubReleaseCreate(
222+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
223+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
224+
)
225+
}
226+
}
227+
}
228+
229+
// Creating GitHub Page
230+
stage('GitHub Page Create') {
231+
when {
232+
anyOf {
233+
allOf {
234+
not { changeRequest() }
235+
anyOf {branch 'master'; branch 'main';}
236+
}
237+
}
238+
}
239+
240+
steps {
241+
script {
242+
githubPageCreate(
243+
githubPage: "${env.GITHUB_PAGES}",
244+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
245+
)
246+
}
247+
}
248+
}
249+
250+
//Deploying the Github content to portal
251+
stage('Portal-Deploy') {
252+
when {
253+
allOf {
254+
not { changeRequest() }
255+
anyOf {branch 'master'; branch 'main';}
256+
}
257+
}
258+
steps {
259+
script {
260+
portalDeploy(
261+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
262+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
263+
)
264+
}
265+
}
266+
}
267+
}
268+
269+
post {
270+
success{
271+
script {
272+
sendMail(
273+
mailId: "${env.NOTIFICATION_EMAIL}",
274+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
275+
body: "Something is right with ${env.BUILD_URL}"
276+
)
277+
}
278+
}
279+
failure {
280+
script {
281+
sendMail(
282+
mailId: "${env.NOTIFICATION_EMAIL}",
283+
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}",
284+
body: "Something is right with ${env.BUILD_URL}"
285+
)
286+
}
287+
}
288+
}
289+
}

.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)