Skip to content

Commit ddb15b6

Browse files
committed
Pull request #3: Test Deployment of dsPIC33e code examples
Merge in MCU16CE/dspic33e-code-examples from develop to test_deploy * commit 'ce1dfda052bad8fa5c350d7afe9834999f9b9270': Updated README.md Updated main.json Updated readme.md Updated the readme.md Addressed review comments removed "pic24e" mention from main.json updated repo name updated jenkisnfile updated jenkinsfile Updated README added .gitignore file updated jenkinsfile updated metadata Updated metadata files updated project configuration Removed revision history from README.md Added ADC Sampling at 1.1MSPS project Added 2 projects ADC Sampling and IIR Filtering and ADC Sampling and FIR Filtering Initial commit
2 parents 0acd2f1 + ce1dfda commit ddb15b6

File tree

58 files changed

+10091
-17
lines changed

Some content is hidden

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

58 files changed

+10091
-17
lines changed

.citd/Jenkinsfilek8s

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

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