Skip to content

Commit 113901e

Browse files
committed
Merge pull request #10 in MCU16CE/pic24f-hello-world-uart from ~I15232/pic24f-hello-world-uart:feature/MCU16GITHUB-2-create-and-setup-bitbucket-repo to master
* commit '271fbd6ec3e53b428262a190ff53c1c29189e8cb': removed archiving of artifacts Template/example mandatory files
2 parents fd4e5b7 + 271fbd6 commit 113901e

File tree

6 files changed

+199
-0
lines changed

6 files changed

+199
-0
lines changed

.citd/Jenkinsfilek8s

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
pipeline {
2+
agent {
3+
kubernetes {
4+
label 'github_deployment'
5+
defaultContainer 'xc16-mplabx-sonar-fmpp-python'
6+
yamlFile '.citd/cloudprovider.yml'
7+
}
8+
}
9+
10+
11+
environment {
12+
NOTIFICATION_EMAIL = '[email protected]'
13+
//Update this URL based on where(which organization) it needs to be deployed
14+
GITHUB_URL ='https://github.com/mchpTestArea'
15+
//This is the BitBucket repo URL which we want to deploy
16+
BITBUCKET_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/pic24f-hello-world-uart.git'
17+
GITHUB_CREDENTIAL_ID = 'GITHUB_PIC_AVR_TEST_TOKEN'
18+
CHANGE_LOG_PATH = 'changelog.md'
19+
SOURCE_PROJECT_META_DATA = '.main-meta/main.json'
20+
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
21+
}
22+
23+
options {
24+
timestamps()
25+
timeout(time: 20, unit: 'MINUTES')
26+
}
27+
28+
stages {
29+
30+
stage('Checkout') {
31+
steps {
32+
checkout scm
33+
}
34+
}
35+
36+
stage('Build') {
37+
steps {
38+
script {
39+
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-mplabx-c-build.git")
40+
execute("cd ./tool-mplabx-c-build && node buildLauncher.js sp=../ rp=./output genMK=true")
41+
}
42+
}
43+
}
44+
45+
// Cloning the tool used for GitHub deployment
46+
stage('GitHub tool clone'){
47+
steps{
48+
script{
49+
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git")
50+
execute("chmod +x ./tool-github-deploy/tool-github-deploy/tool-github-deploy.py")
51+
}
52+
}
53+
}
54+
55+
}
56+
57+
post {
58+
success{
59+
script {
60+
if (!"${env.CHANGE_AUTHOR_EMAIL}".equalsIgnoreCase("null")) {
61+
mail to: "${env.CHANGE_AUTHOR_EMAIL}, ${env.NOTIFICATION_EMAIL}",
62+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
63+
body: "Something is right with ${env.BUILD_URL}"
64+
} else {
65+
mail to: "${env.NOTIFICATION_EMAIL}",
66+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
67+
body: "Something is right with ${env.BUILD_URL}"
68+
}
69+
}
70+
}
71+
failure {
72+
script {
73+
if (!"${env.CHANGE_AUTHOR_EMAIL}".equalsIgnoreCase("null")) {
74+
mail to: "${env.CHANGE_AUTHOR_EMAIL}, ${env.NOTIFICATION_EMAIL}",
75+
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
76+
body: "Pipeline failure. ${env.BUILD_URL}"
77+
} else {
78+
mail to: "${env.NOTIFICATION_EMAIL}",
79+
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
80+
body: "Pipeline failure. ${env.BUILD_URL}"
81+
}
82+
}
83+
}
84+
}
85+
}
86+
87+
def execute(String command) {
88+
if (isUnix()) {
89+
sh command
90+
} else {
91+
bat command
92+
}
93+
}
94+
95+
String readJsonObject() {
96+
def jsonObj = readJSON interpolate: true, file: "${env.SOURCE_PROJECT_META_DATA}"
97+
return jsonObj
98+
}

.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:1.50-5.40-4.2-0.9.16-3.x-1.17.3-12.x
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: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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.project",
7+
"version": "1.0.0",
8+
"displayName": "PIC24F Hello World",
9+
"projectName": "pic24f-hello-world-uart",
10+
"shortDescription": "PIC24F Hello World Example",
11+
"ide": {
12+
"name": "MPLABX",
13+
"semverRange": ">=5.35.0"
14+
},
15+
"compiler": {
16+
"name": "XC16",
17+
"semverRange": "^1.50.0"
18+
},
19+
"dfp": {
20+
"name": "PIC24F-GA-GB_DFP",
21+
"semverRange": "^1.0.41"
22+
},
23+
"device": {
24+
"metaDataVersion": "1.0.0",
25+
"category": "com.microchip.portal.contentRef",
26+
"content": {
27+
"metaDataVersion": "1.0.0",
28+
"category": "com.microchip.device",
29+
"name": "PIC24FJ1024GB610",
30+
"versionRange": "*"
31+
}
32+
},
33+
"subcategories":[
34+
"Hello World",
35+
[
36+
"Peripherals",
37+
"GPIO",
38+
"UART"
39+
]
40+
],
41+
"peripherals": [
42+
"GPIO",
43+
"UART"
44+
],
45+
"keywords": [
46+
"GPIO",
47+
"UART"
48+
]
49+
}
50+
}

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Product name release version Ex: pic24f-hello-worl-uart release v1.0.0
2+
### Release Highlights
3+
4+
5+
6+
### Features Added\Updated
7+

license.md

Whitespace-only changes.

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Repo or Project Name
2+
3+
Image of the board if any
4+
5+
## Summary
6+
7+
8+
## Related Documentation
9+
10+
11+
12+
## Software Used
13+
14+
15+
16+
## Hardware Used
17+
18+
19+
20+
## Setup
21+
22+
23+
24+
## Operation
25+
26+

0 commit comments

Comments
 (0)