Skip to content

Commit 097580f

Browse files
committed
Pull request #9: Develop
Merge in MCU16CE/matlab-dspic33ck-curiosityboard-pwmexample-sixstep-commutation from develop to master * commit 'c9753a0ad6937c5bafe987c3e946ba63e28fe45c': Updated to release on pic-avr-examples Updated Readme document Updated the files for release Updated Readme after review Adding Readme pdf file Modified the Readme Adding the PWM initialization file and Simulink model is modified. Corrections in readme Updating the Readme file after review Edited Readme Modified simulink file. Edited one image Modified the Readme file Adding the ReadMe file Adding the simulink file and c code file Edit main.json Updatd the Jenkins file Initial commit
2 parents 3c23214 + c9753a0 commit 097580f

29 files changed

Lines changed: 831 additions & 8 deletions

.citd/Jenkinsfilek8s

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

.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: 750Mi
28+
limits:
29+
cpu: 1
30+
memory: 1Gi

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