blob: be71d42d8e233b65270b9d456328945559356fcb [file] [log] [blame]
Jonatan Antoni107fde42021-04-29 15:18:15 +02001@Library("cmsis")
Jonatan Antoni6485da42021-06-17 15:23:34 +02002import com.arm.dsg.cmsis.jenkins.ArtifactoryHelper
Jonatan Antoni107fde42021-04-29 15:18:15 +02003
4DOCKERINFO = [
Jonatan Antoni4b0ede32021-04-29 18:26:29 +02005 'staging': [
Jonatan Antoni107fde42021-04-29 15:18:15 +02006 'registryUrl': 'mcu--docker-staging.eu-west-1.artifactory.aws.arm.com',
7 'registryCredentialsId': 'artifactory',
8 'k8sPullSecret': 'artifactory-mcu-docker-staging',
9 'namespace': 'mcu--docker-staging',
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020010 'image': 'cmsis/linux',
Jonatan Antoni107fde42021-04-29 15:18:15 +020011 'label': "${JENKINS_ENV}-${JOB_BASE_NAME}-${BUILD_NUMBER}"
12 ],
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020013 'production': [
Jonatan Antoni107fde42021-04-29 15:18:15 +020014 'registryUrl': 'mcu--docker.eu-west-1.artifactory.aws.arm.com',
15 'registryCredentialsId': 'artifactory',
16 'namespace': 'mcu--docker',
17 'k8sPullSecret': 'artifactory-mcu-docker',
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020018 'image': 'cmsis/linux',
19 'label': 'latest'
Jonatan Antoni107fde42021-04-29 15:18:15 +020020 ]
21]
Jonatan Antonib5d07f02021-07-14 12:50:57 +020022HADOLINT_VERSION = '2.6.0-alpine'
Jonatan Antoni107fde42021-04-29 15:18:15 +020023
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020024dockerinfo = DOCKERINFO['production']
Jonatan Antoni107fde42021-04-29 15:18:15 +020025
26isPrecommit = (JOB_BASE_NAME == 'pre_commit')
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020027isPostcommit = (JOB_BASE_NAME == 'post_commit')
Jonatan Antoni107fde42021-04-29 15:18:15 +020028isNightly = (JOB_BASE_NAME == 'nightly')
Jonatan Antoni6485da42021-06-17 15:23:34 +020029isRelease = (JOB_BASE_NAME == 'release')
Jonatan Antoni107fde42021-04-29 15:18:15 +020030
Jonatan Antoni5f8564b2021-04-29 16:59:54 +020031patternGlobal = [
32 '^Jenkinsfile'
33]
34
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020035patternDocker = [
36 '^docker/.*'
37]
38
Jonatan Antoni107fde42021-04-29 15:18:15 +020039patternCoreM = [
40 '^CMSIS/Core/Include/.*',
41 '^Device/ARM/ARMCM.*'
42]
43
44patternCoreA = [
45 '^CMSIS/Core_A/Include/.*',
46 '^Device/ARM/ARMCA.*'
47]
48
49patternCoreValidation = [
50 '^CMSIS/CoreValidation/.*'
51]
52
53CONFIGURATIONS = [
54 'pre_commit': [
Jonatan Antoni983aa0b2021-05-05 13:19:48 +020055 'mdevices': ['CM0', 'CM3', 'CM4FP', 'CM7DP', 'CM23', 'CM33NS', 'CM35PS', 'CM55NS'],
Jonatan Antoni107fde42021-04-29 15:18:15 +020056 'adevices': ['CA7', 'CA9neon'],
57 'devices' : [],
58 'configs' : [
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020059 'AC5': ['low', 'tiny'],
Jonatan Antoni107fde42021-04-29 15:18:15 +020060 'AC6': ['low', 'tiny'],
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020061 'AC6LTM': ['low', 'tiny'],
62 'GCC': ['low', 'tiny']
63 ]
64 ],
65 'post_commit': [
66 'devices' : ['CM0', 'CM0plus', 'CM3', 'CM4', 'CM4FP', 'CM7', 'CM7SP', 'CM7DP',
67 'CM23', 'CM23S', 'CM23NS', 'CM33', 'CM33S', 'CM33NS',
Jonatan Antoni983aa0b2021-05-05 13:19:48 +020068 'CM35P', 'CM35PS', 'CM35PNS', 'CM55', 'CM55S', 'CM55NS',
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020069 'CA5', 'CA5neon', 'CA7', 'CA7neon', 'CA9', 'CA9neon'],
70 'configs' : [
71 'AC5': ['low', 'tiny'],
72 'AC6': ['low', 'tiny'],
73 'AC6LTM': ['low', 'tiny'],
74 'GCC': ['low', 'tiny']
Jonatan Antoni107fde42021-04-29 15:18:15 +020075 ]
76 ],
Jonatan Antoni6485da42021-06-17 15:23:34 +020077 'nightly': [
Jonatan Antoni107fde42021-04-29 15:18:15 +020078 'devices' : ['CM0', 'CM0plus', 'CM3', 'CM4', 'CM4FP', 'CM7', 'CM7SP', 'CM7DP',
79 'CM23', 'CM23S', 'CM23NS', 'CM33', 'CM33S', 'CM33NS',
Jonatan Antoni983aa0b2021-05-05 13:19:48 +020080 'CM35P', 'CM35PS', 'CM35PNS', 'CM55', 'CM55S', 'CM55NS',
Jonatan Antoni107fde42021-04-29 15:18:15 +020081 'CA5', 'CA5neon', 'CA7', 'CA7neon', 'CA9', 'CA9neon'],
82 'configs' : [
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020083 'AC5': ['low', 'mid', 'high', 'size', 'tiny'],
Jonatan Antoni107fde42021-04-29 15:18:15 +020084 'AC6': ['low', 'mid', 'high', 'size', 'tiny'],
Jonatan Antoni4b0ede32021-04-29 18:26:29 +020085 'AC6LTM': ['low', 'mid', 'high', 'size', 'tiny'],
86 'GCC': ['low', 'mid', 'high', 'size', 'tiny']
Jonatan Antoni107fde42021-04-29 15:18:15 +020087 ]
Jonatan Antoni6485da42021-06-17 15:23:34 +020088 ],
89 'release': []
Jonatan Antoni107fde42021-04-29 15:18:15 +020090]
91CONFIGURATION = CONFIGURATIONS[JOB_BASE_NAME]
92
93// ---- PIPELINE CODE ----
94
95def getChangeset() {
96 def fileset = sh encoding: 'UTF-8', label: '', returnStdout: true, script: 'git diff --name-only HEAD~1..HEAD'
97 return fileset.split('\n')
98}
99
100def fileSetMatches(fileset, patternset) {
101 return patternset.any { p ->
102 fileset.any{ f -> f ==~ p }
103 }
104}
105
106FORCE_BUILD = false
Jonatan Antoni6485da42021-06-17 15:23:34 +0200107DOCKER_BUILD = isPrecommit || isPostcommit || isNightly
108CORE_VALIDATION = isPrecommit || isPostcommit || isNightly
Jonatan Antoni107fde42021-04-29 15:18:15 +0200109COMMIT = null
110VERSION = null
111
Jonatan Antoni6485da42021-06-17 15:23:34 +0200112artifactory = new ArtifactoryHelper(this)
113
Jonatan Antoni107fde42021-04-29 15:18:15 +0200114pipeline {
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200115 agent { label 'master' }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200116 options {
117 timestamps()
118 timeout(time: 1, unit: 'HOURS')
119 ansiColor('xterm')
120 skipDefaultCheckout()
121 }
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200122 environment {
123 CI_ACCOUNT = credentials('grasci')
124 ARTIFACTORY = credentials('artifactory')
125 USER = "${CI_ACCOUNT_USR}"
126 PASS = "${CI_ACCOUNT_PSW}"
127 ARTIFACTORY_API_KEY = "${ARTIFACTORY_PSW}"
128 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200129 stages {
130 stage('Checkout') {
131 steps {
132 script {
133 COMMIT = checkoutScmWithRetry(3)
134 echo "COMMIT: ${COMMIT}"
Jonatan Antoni744e2392022-01-27 16:58:49 +0100135 VERSION = (sh(returnStdout: true, script: 'git describe --tags --always')).trim()
Jonatan Antoni107fde42021-04-29 15:18:15 +0200136 echo "VERSION: '${VERSION}'"
137 }
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200138
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200139 stash name: 'dockerfile', includes: 'docker/**'
Jonatan Antoni107fde42021-04-29 15:18:15 +0200140 }
141 }
142
143 stage('Analyse') {
144 when {
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200145 expression { return isPrecommit || isPostcommit }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200146 beforeOptions true
147 }
148 steps {
149 script {
150 def fileset = changeset
Jonatan Antoni5f8564b2021-04-29 16:59:54 +0200151 def hasGlobal = fileSetMatches(fileset, patternGlobal)
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200152 def hasDocker = fileSetMatches(fileset, patternDocker)
Jonatan Antoni107fde42021-04-29 15:18:15 +0200153 def hasCoreM = fileSetMatches(fileset, patternCoreM)
154 def hasCoreA = fileSetMatches(fileset, patternCoreA)
155 def hasCoreValidation = fileSetMatches(fileset, patternCoreValidation)
156
157echo """Change analysis:
Jonatan Antoni5f8564b2021-04-29 16:59:54 +0200158- hasGlobal = ${hasGlobal}
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200159- hasDocker = ${hasDocker}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200160- hasCoreM = ${hasCoreM}
161- hasCoreA = ${hasCoreA}
162- hasCoreValidation = ${hasCoreValidation}
163"""
164
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200165 if (isPrecommit) {
166 if (hasGlobal || hasDocker || hasCoreM || hasCoreValidation) {
167 CONFIGURATION['devices'] += CONFIGURATION['mdevices']
168 }
169 if (hasGlobal || hasDocker || hasCoreA || hasCoreValidation) {
170 CONFIGURATION['devices'] += CONFIGURATION['adevices']
171 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200172 }
173
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200174 DOCKER_BUILD &= hasDocker
175 CORE_VALIDATION &= hasGlobal || hasDocker || hasCoreM || hasCoreA || hasCoreValidation
176
Jonatan Antoni107fde42021-04-29 15:18:15 +0200177echo """Stage schedule:
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200178- DOCKER_BUILD = ${DOCKER_BUILD}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200179- CORE_VALIDATION = ${CORE_VALIDATION}
180"""
181 }
182 }
183 }
184
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200185 stage('Docker Lint') {
186 when {
187 expression { return DOCKER_BUILD }
188 beforeOptions true
189 }
190 agent {
191 kubernetes {
192 defaultContainer 'hadolint'
193 slaveConnectTimeout 600
194 yaml """\
195 apiVersion: v1
196 kind: Pod
197 securityContext:
198 runAsUser: 1000
199 runAsGroup: 1000
200 spec:
201 imagePullSecrets:
202 - name: artifactory-mcu-docker
203 securityContext:
204 runAsUser: 1000
205 runAsGroup: 1000
206 containers:
207 - name: hadolint
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200208 image: mcu--docker.eu-west-1.artifactory.aws.arm.com/hadolint/hadolint:${HADOLINT_VERSION}
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200209 alwaysPullImage: true
210 imagePullPolicy: Always
211 command:
212 - sleep
213 args:
214 - infinity
215 resources:
216 requests:
217 cpu: 2
218 memory: 2Gi
219 """.stripIndent()
220 }
221 }
222 steps {
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200223 unstash 'dockerfile'
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200224
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200225 sh 'hadolint --format json docker/dockerfile* | tee hadolint.log'
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200226
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200227 recordIssues tools: [hadoLint(id: 'hadolint', pattern: 'hadolint.log')],
228 qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
229 referenceJobName: 'nightly', ignoreQualityGate: true
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200230 }
231 }
232
233 stage('Docker Build') {
234 when {
235 expression { return (isPrecommit || isPostcommit) && DOCKER_BUILD }
236 beforeOptions true
237 }
238 agent {
239 kubernetes {
240 defaultContainer 'docker-dind'
241 slaveConnectTimeout 600
242 yaml """\
243 apiVersion: v1
244 kind: Pod
245 spec:
246 imagePullSecrets:
247 - name: artifactory-mcu-docker
248 containers:
249 - name: docker-dind
250 image: docker:dind
251 securityContext:
252 privileged: true
253 volumeMounts:
254 - name: dind-storage
255 mountPath: /var/lib/docker
256 volumes:
257 - name: dind-storage
258 emptyDir: {}
259 """.stripIndent()
260 }
261 }
262 steps {
263 sh('apk add bash curl git')
264 script {
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200265 unstash 'dockerfile'
Jonatan Antoni6485da42021-06-17 15:23:34 +0200266
Jonatan Antonib5d07f02021-07-14 12:50:57 +0200267 dir('docker') {
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200268 dockerinfo = DOCKERINFO['staging']
269 withCredentials([sshUserPrivateKey(credentialsId: 'grasci_with_pk',
270 keyFileVariable: 'grasciPk',
271 passphraseVariable: '',
272 usernameVariable: 'grasciUsername')]) {
273 sh("GIT_SSH_COMMAND='ssh -i $grasciPk -o StrictHostKeyChecking=no' ./getDependencies.sh")
274 }
275 docker.withRegistry("https://${dockerinfo['registryUrl']}", dockerinfo['registryCredentialsId']) {
276 def image = docker.build("${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}", "--build-arg DOCKER_REGISTRY=${dockerinfo['registryUrl']} .")
277 image.push()
278 }
279 }
280 }
281 }
282 }
283
Jonatan Antonidef6f802021-05-06 17:31:38 +0200284 stage('Pack') {
285 agent {
286 kubernetes {
287 defaultContainer 'cmsis'
288 slaveConnectTimeout 600
289 yaml """\
290 apiVersion: v1
291 kind: Pod
292 spec:
293 imagePullSecrets:
294 - name: ${dockerinfo['k8sPullSecret']}
295 securityContext:
296 runAsUser: 1000
297 runAsGroup: 1000
298 containers:
299 - name: cmsis
300 image: ${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}
301 alwaysPullImage: true
302 imagePullPolicy: Always
303 command:
304 - sleep
305 args:
306 - infinity
307 resources:
308 requests:
309 cpu: 2
310 memory: 2Gi
311 """.stripIndent()
312 }
313 }
314 steps {
315 checkoutScmWithRetry(3)
Jonatan Antoni2d177712022-04-06 17:59:41 +0200316 sh('./CMSIS/Utilities/fetch_devtools.sh')
Jonatan Antonidef6f802021-05-06 17:31:38 +0200317 sh('./CMSIS/RTOS/RTX/LIB/fetch_libs.sh')
318 sh('./CMSIS/RTOS2/RTX/Library/fetch_libs.sh')
Jonatan Antoni6485da42021-06-17 15:23:34 +0200319
Jonatan Antonidef6f802021-05-06 17:31:38 +0200320 tee('doxygen.log') {
321 sh('./CMSIS/DoxyGen/gen_doc.sh')
322 }
323 sh('./CMSIS/Utilities/gen_pack.sh')
Jonatan Antoni6485da42021-06-17 15:23:34 +0200324
Jonatan Antonidef6f802021-05-06 17:31:38 +0200325 archiveArtifacts artifacts: 'output/ARM.CMSIS.*.pack', allowEmptyArchive: true
Jonatan Antoni6485da42021-06-17 15:23:34 +0200326 stash name: 'pack', includes: 'output/ARM.CMSIS.*.pack'
Jonatan Antonidef6f802021-05-06 17:31:38 +0200327
328 recordIssues tools: [doxygen(id: 'DOXYGEN', name: 'Doxygen', pattern: 'doxygen.log')],
329 qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
Jonatan Antoni6485da42021-06-17 15:23:34 +0200330 referenceJobName: 'nightly', ignoreQualityGate: true
Jonatan Antonidef6f802021-05-06 17:31:38 +0200331 }
332 }
333
Jonatan Antoni107fde42021-04-29 15:18:15 +0200334 stage('CoreValidation') {
335 when {
336 expression { return CORE_VALIDATION }
337 beforeOptions true
338 }
339 matrix {
340 axes {
341 axis {
342 name 'DEVICE'
343 values 'CM0', 'CM0plus', 'CM3', 'CM4', 'CM4FP', 'CM7', 'CM7SP', 'CM7DP',
344 'CM23', 'CM23S', 'CM23NS', 'CM33', 'CM33S', 'CM33NS',
Jonatan Antoni983aa0b2021-05-05 13:19:48 +0200345 'CM35P', 'CM35PS', 'CM35PNS', 'CM55', 'CM55S', 'CM55NS',
Jonatan Antoni107fde42021-04-29 15:18:15 +0200346 'CA5', 'CA5neon', 'CA7', 'CA7neon', 'CA9', 'CA9neon'
347 }
348 }
349 stages {
350 stage('Test') {
351 when {
352 expression { return DEVICE in CONFIGURATION['devices'] }
353 beforeOptions true
354 }
355 agent {
356 kubernetes {
357 defaultContainer 'cmsis'
358 slaveConnectTimeout 600
359 yaml """\
360 apiVersion: v1
361 kind: Pod
362 spec:
363 imagePullSecrets:
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200364 - name: ${dockerinfo['k8sPullSecret']}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200365 securityContext:
366 runAsUser: 1000
367 runAsGroup: 1000
368 containers:
369 - name: cmsis
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200370 image: ${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200371 alwaysPullImage: true
372 imagePullPolicy: Always
373 command:
374 - sleep
375 args:
376 - infinity
377 resources:
378 requests:
379 cpu: 2
380 memory: 2Gi
381 """.stripIndent()
382 }
383 }
384 steps {
385 checkoutScmWithRetry(3)
386 dir('CMSIS/CoreValidation/Tests') {
387 script {
388 CONFIGURATION['configs'].each { COMPILER, OPTS ->
389 tee("CV_${COMPILER}_${DEVICE}.log") {
390 sh "python3 build.py -d ${DEVICE} -c ${COMPILER} -o ${OPTS.join(' -o ')} build run"
391 }
392 }
393 }
394
Jonatan Antonidef6f802021-05-06 17:31:38 +0200395 archiveArtifacts artifacts: 'CoreValidation_*.zip', allowEmptyArchive: true
Jonatan Antoni107fde42021-04-29 15:18:15 +0200396 stash name: "CV_${DEVICE}", includes: '*.log, *.junit'
397 }
398 }
399 }
400 }
401 }
402 }
403
404 stage('Results') {
Jonatan Antoni6d6cf132021-05-17 16:34:25 +0200405 when {
406 expression { return CORE_VALIDATION }
407 beforeOptions true
408 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200409 steps {
410 dir('results') {
411 deleteDir()
412 script {
413 CONFIGURATION['devices'].each { unstash "CV_${it}" }
414 }
415
Jonatan Antoniaedfddf2021-05-03 18:32:14 +0200416 recordIssues tools: [armCc(id: 'AC5', name: 'Arm Compiler 5', pattern: 'CV_AC5_*.log'),
417 clang(id: 'AC6', name: 'Arm Compiler 6', pattern: 'CV_AC6_*.log'),
418 clang(id: 'AC6LTM', name: 'Arm Compiler 6 LTM', pattern: 'CV_AC6LTM_*.log'),
419 gcc(id: 'GCC', name: 'GNU Compiler', pattern: 'CV_GCC_*.log')],
Jonatan Antoni5f8564b2021-04-29 16:59:54 +0200420 qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
421 referenceJobName: 'nightly', ignoreQualityGate: true
Jonatan Antoni107fde42021-04-29 15:18:15 +0200422 xunit([
423 JUnit(pattern: 'corevalidation_*.junit', failIfNotNew: false, skipNoTestFiles: true)
424 ])
425 }
426
427 }
428 }
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200429
430 stage('Docker Promote') {
431 when {
432 expression { return isPostcommit && DOCKER_BUILD }
433 beforeOptions true
434 }
435 agent {
436 kubernetes {
437 defaultContainer 'docker-dind'
438 slaveConnectTimeout 600
439 yaml """\
440 apiVersion: v1
441 kind: Pod
442 spec:
443 imagePullSecrets:
444 - name: artifactory-mcu-docker
445 containers:
446 - name: docker-dind
447 image: docker:dind
448 securityContext:
449 privileged: true
450 volumeMounts:
451 - name: dind-storage
452 mountPath: /var/lib/docker
453 volumes:
454 - name: dind-storage
455 emptyDir: {}
456 """.stripIndent()
457 }
458 }
459 steps {
460 script {
461 String postCommitTag = "${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}"
462 String prodCommitTag = "${DOCKERINFO['production']['registryUrl']}/${DOCKERINFO['production']['image']}:${DOCKERINFO['production']['label']}"
463
464 // Pull & retag Docker Staging Container to Production
465 docker.withRegistry("https://${dockerinfo['registryUrl']}", dockerinfo['registryCredentialsId']) {
466 def image = docker.image("$postCommitTag")
467 image.pull()
468 sh "docker tag $postCommitTag $prodCommitTag"
469 }
470 // Push to Docker Production
471 docker.withRegistry("https://${DOCKERINFO['production']['registryUrl']}", DOCKERINFO['production']['registryCredentialsId']) {
472 def image = docker.image("$prodCommitTag")
473 image.push()
474 }
475 }
476 }
477 }
Jonatan Antoni6485da42021-06-17 15:23:34 +0200478
479 stage('Release Promote') {
480 when {
481 expression { return isRelease }
482 beforeOptions true
483 }
484 steps {
485 unstash name: 'pack'
486 dir('output') {
487 script {
488 artifactory.upload pattern: 'ARM.CMSIS.*.pack',
489 target: "mcu.promoted/CMSIS_5/${VERSION}/",
490 props: "GIT_COMMIT=${COMMIT['GIT_COMMIT']}"
491 }
492 withCredentials([string(credentialsId: 'grasci_github', variable: 'ghtoken')]) {
Jonatan Antoni546c5c42021-06-17 16:02:24 +0200493 sh """
Jonatan Antoni6485da42021-06-17 15:23:34 +0200494 curl -XPOST \
495 -H "Authorization:token ${ghtoken}" \
496 -H "Content-Type:application/octet-stream" \
497 --data-binary @ARM.CMSIS.${VERSION}.pack \
Jonatan Antoni546c5c42021-06-17 16:02:24 +0200498 https://uploads.github.com/repos/ARM-software/CMSIS_5/releases/${VERSION}/assets?name=ARM.CMSIS.${VERSION}.pack
499 """
Jonatan Antoni6485da42021-06-17 15:23:34 +0200500 }
501 }
502 }
503 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200504 }
505}