blob: 375bf37f62537d7a334176b581a13c6eccc2bb80 [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)
316 sh('./CMSIS/RTOS/RTX/LIB/fetch_libs.sh')
317 sh('./CMSIS/RTOS2/RTX/Library/fetch_libs.sh')
Jonatan Antoni6485da42021-06-17 15:23:34 +0200318
Jonatan Antonidef6f802021-05-06 17:31:38 +0200319 tee('doxygen.log') {
320 sh('./CMSIS/DoxyGen/gen_doc.sh')
321 }
322 sh('./CMSIS/Utilities/gen_pack.sh')
Jonatan Antoni6485da42021-06-17 15:23:34 +0200323
Jonatan Antonidef6f802021-05-06 17:31:38 +0200324 archiveArtifacts artifacts: 'output/ARM.CMSIS.*.pack', allowEmptyArchive: true
Jonatan Antoni6485da42021-06-17 15:23:34 +0200325 stash name: 'pack', includes: 'output/ARM.CMSIS.*.pack'
Jonatan Antonidef6f802021-05-06 17:31:38 +0200326
327 recordIssues tools: [doxygen(id: 'DOXYGEN', name: 'Doxygen', pattern: 'doxygen.log')],
328 qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
Jonatan Antoni6485da42021-06-17 15:23:34 +0200329 referenceJobName: 'nightly', ignoreQualityGate: true
Jonatan Antonidef6f802021-05-06 17:31:38 +0200330 }
331 }
332
Jonatan Antoni107fde42021-04-29 15:18:15 +0200333 stage('CoreValidation') {
334 when {
335 expression { return CORE_VALIDATION }
336 beforeOptions true
337 }
338 matrix {
339 axes {
340 axis {
341 name 'DEVICE'
342 values 'CM0', 'CM0plus', 'CM3', 'CM4', 'CM4FP', 'CM7', 'CM7SP', 'CM7DP',
343 'CM23', 'CM23S', 'CM23NS', 'CM33', 'CM33S', 'CM33NS',
Jonatan Antoni983aa0b2021-05-05 13:19:48 +0200344 'CM35P', 'CM35PS', 'CM35PNS', 'CM55', 'CM55S', 'CM55NS',
Jonatan Antoni107fde42021-04-29 15:18:15 +0200345 'CA5', 'CA5neon', 'CA7', 'CA7neon', 'CA9', 'CA9neon'
346 }
347 }
348 stages {
349 stage('Test') {
350 when {
351 expression { return DEVICE in CONFIGURATION['devices'] }
352 beforeOptions true
353 }
354 agent {
355 kubernetes {
356 defaultContainer 'cmsis'
357 slaveConnectTimeout 600
358 yaml """\
359 apiVersion: v1
360 kind: Pod
361 spec:
362 imagePullSecrets:
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200363 - name: ${dockerinfo['k8sPullSecret']}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200364 securityContext:
365 runAsUser: 1000
366 runAsGroup: 1000
367 containers:
368 - name: cmsis
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200369 image: ${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}
Jonatan Antoni107fde42021-04-29 15:18:15 +0200370 alwaysPullImage: true
371 imagePullPolicy: Always
372 command:
373 - sleep
374 args:
375 - infinity
376 resources:
377 requests:
378 cpu: 2
379 memory: 2Gi
380 """.stripIndent()
381 }
382 }
383 steps {
384 checkoutScmWithRetry(3)
385 dir('CMSIS/CoreValidation/Tests') {
386 script {
387 CONFIGURATION['configs'].each { COMPILER, OPTS ->
388 tee("CV_${COMPILER}_${DEVICE}.log") {
389 sh "python3 build.py -d ${DEVICE} -c ${COMPILER} -o ${OPTS.join(' -o ')} build run"
390 }
391 }
392 }
393
Jonatan Antonidef6f802021-05-06 17:31:38 +0200394 archiveArtifacts artifacts: 'CoreValidation_*.zip', allowEmptyArchive: true
Jonatan Antoni107fde42021-04-29 15:18:15 +0200395 stash name: "CV_${DEVICE}", includes: '*.log, *.junit'
396 }
397 }
398 }
399 }
400 }
401 }
402
403 stage('Results') {
Jonatan Antoni6d6cf132021-05-17 16:34:25 +0200404 when {
405 expression { return CORE_VALIDATION }
406 beforeOptions true
407 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200408 steps {
409 dir('results') {
410 deleteDir()
411 script {
412 CONFIGURATION['devices'].each { unstash "CV_${it}" }
413 }
414
Jonatan Antoniaedfddf2021-05-03 18:32:14 +0200415 recordIssues tools: [armCc(id: 'AC5', name: 'Arm Compiler 5', pattern: 'CV_AC5_*.log'),
416 clang(id: 'AC6', name: 'Arm Compiler 6', pattern: 'CV_AC6_*.log'),
417 clang(id: 'AC6LTM', name: 'Arm Compiler 6 LTM', pattern: 'CV_AC6LTM_*.log'),
418 gcc(id: 'GCC', name: 'GNU Compiler', pattern: 'CV_GCC_*.log')],
Jonatan Antoni5f8564b2021-04-29 16:59:54 +0200419 qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
420 referenceJobName: 'nightly', ignoreQualityGate: true
Jonatan Antoni107fde42021-04-29 15:18:15 +0200421 xunit([
422 JUnit(pattern: 'corevalidation_*.junit', failIfNotNew: false, skipNoTestFiles: true)
423 ])
424 }
425
426 }
427 }
Jonatan Antoni4b0ede32021-04-29 18:26:29 +0200428
429 stage('Docker Promote') {
430 when {
431 expression { return isPostcommit && DOCKER_BUILD }
432 beforeOptions true
433 }
434 agent {
435 kubernetes {
436 defaultContainer 'docker-dind'
437 slaveConnectTimeout 600
438 yaml """\
439 apiVersion: v1
440 kind: Pod
441 spec:
442 imagePullSecrets:
443 - name: artifactory-mcu-docker
444 containers:
445 - name: docker-dind
446 image: docker:dind
447 securityContext:
448 privileged: true
449 volumeMounts:
450 - name: dind-storage
451 mountPath: /var/lib/docker
452 volumes:
453 - name: dind-storage
454 emptyDir: {}
455 """.stripIndent()
456 }
457 }
458 steps {
459 script {
460 String postCommitTag = "${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}"
461 String prodCommitTag = "${DOCKERINFO['production']['registryUrl']}/${DOCKERINFO['production']['image']}:${DOCKERINFO['production']['label']}"
462
463 // Pull & retag Docker Staging Container to Production
464 docker.withRegistry("https://${dockerinfo['registryUrl']}", dockerinfo['registryCredentialsId']) {
465 def image = docker.image("$postCommitTag")
466 image.pull()
467 sh "docker tag $postCommitTag $prodCommitTag"
468 }
469 // Push to Docker Production
470 docker.withRegistry("https://${DOCKERINFO['production']['registryUrl']}", DOCKERINFO['production']['registryCredentialsId']) {
471 def image = docker.image("$prodCommitTag")
472 image.push()
473 }
474 }
475 }
476 }
Jonatan Antoni6485da42021-06-17 15:23:34 +0200477
478 stage('Release Promote') {
479 when {
480 expression { return isRelease }
481 beforeOptions true
482 }
483 steps {
484 unstash name: 'pack'
485 dir('output') {
486 script {
487 artifactory.upload pattern: 'ARM.CMSIS.*.pack',
488 target: "mcu.promoted/CMSIS_5/${VERSION}/",
489 props: "GIT_COMMIT=${COMMIT['GIT_COMMIT']}"
490 }
491 withCredentials([string(credentialsId: 'grasci_github', variable: 'ghtoken')]) {
Jonatan Antoni546c5c42021-06-17 16:02:24 +0200492 sh """
Jonatan Antoni6485da42021-06-17 15:23:34 +0200493 curl -XPOST \
494 -H "Authorization:token ${ghtoken}" \
495 -H "Content-Type:application/octet-stream" \
496 --data-binary @ARM.CMSIS.${VERSION}.pack \
Jonatan Antoni546c5c42021-06-17 16:02:24 +0200497 https://uploads.github.com/repos/ARM-software/CMSIS_5/releases/${VERSION}/assets?name=ARM.CMSIS.${VERSION}.pack
498 """
Jonatan Antoni6485da42021-06-17 15:23:34 +0200499 }
500 }
501 }
502 }
Jonatan Antoni107fde42021-04-29 15:18:15 +0200503 }
504}