Dean Birch | 62c4f08 | 2020-01-17 16:13:26 +0000 | [diff] [blame] | 1 | #!/usr/bin/env groovy |
| 2 | //------------------------------------------------------------------------------- |
| 3 | // Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. |
| 4 | // |
| 5 | // SPDX-License-Identifier: BSD-3-Clause |
| 6 | // |
| 7 | //------------------------------------------------------------------------------- |
| 8 | |
Dean Birch | d0f9f8c | 2020-03-26 11:10:33 +0000 | [diff] [blame^] | 9 | @Library('trustedfirmware') _ |
| 10 | import org.trustedfirmware.Gerrit |
| 11 | |
Dean Birch | 62c4f08 | 2020-01-17 16:13:26 +0000 | [diff] [blame] | 12 | node("docker-amd64-xenial") { |
| 13 | stage("Init") { |
| 14 | cleanWs() |
| 15 | dir("trusted-firmware-m") { |
| 16 | checkout( |
| 17 | poll: false, |
| 18 | scm: [ |
| 19 | $class: 'GitSCM', |
| 20 | branches: [[name: '$GERRIT_BRANCH']], |
| 21 | extensions: [[$class: 'BuildChooserSetting', buildChooser: [$class: 'GerritTriggerBuildChooser']]], |
| 22 | userRemoteConfigs: [[ |
| 23 | credentialsId: 'GIT_SSH_KEY', |
| 24 | refspec: '$GERRIT_REFSPEC', url: '$CODE_REPO' |
| 25 | ]] |
| 26 | ]) |
| 27 | } |
| 28 | dir("tf-m-ci-scripts") { |
| 29 | git url: '$CI_SCRIPTS_REPO', branch: 'master', credentialsId: 'GIT_SSH_KEY' |
| 30 | } |
| 31 | dir("mbed-crypto") { |
| 32 | checkout( |
| 33 | changelog: false, |
| 34 | poll: false, |
| 35 | scm: [ |
| 36 | $class: 'GitSCM', |
| 37 | branches: [[name: 'FETCH_HEAD']], |
| 38 | userRemoteConfigs: [[ |
| 39 | refspec: 'refs/tags/$MBEDCRYPTO_VERSION', |
Dean Birch | a6ede7e | 2020-03-13 14:00:33 +0000 | [diff] [blame] | 40 | url: params.MBEDCRYPTO_URL |
Dean Birch | 62c4f08 | 2020-01-17 16:13:26 +0000 | [diff] [blame] | 41 | ]] |
| 42 | ] |
| 43 | ) |
| 44 | } |
| 45 | sh """ |
Dean Birch | a6ede7e | 2020-03-13 14:00:33 +0000 | [diff] [blame] | 46 | # Host https://github.com/Arm-software/CMSIS_5/releases/download/5.5.0/ARM.CMSIS.5.5.0.pack |
| 47 | # under \$JENKINS_HOME/userContent |
| 48 | wget -O cmsis.pack -q \${JENKINS_URL}/userContent/ARM.CMSIS.${CMSIS_VERSION}.pack |
Dean Birch | 62c4f08 | 2020-01-17 16:13:26 +0000 | [diff] [blame] | 49 | unzip -o -d CMSIS_5 cmsis.pack |
| 50 | """ |
| 51 | } |
Dean Birch | d0f9f8c | 2020-03-26 11:10:33 +0000 | [diff] [blame^] | 52 | try { |
| 53 | verify = 1 |
| 54 | stage("Build") { |
| 55 | sh "tf-m-ci-scripts/build-docs.sh" |
| 56 | } |
| 57 | stage("Post") { |
| 58 | archiveArtifacts 'trusted-firmware-m/build/install/**' |
| 59 | } |
| 60 | } catch (Exception e) { |
| 61 | manager.buildFailure() |
| 62 | verify = -1 |
| 63 | } finally { |
| 64 | g = new Gerrit() |
| 65 | g.verifyStatusInWorkspace(verify, 'tf-m-build-docs', 'build') |
Dean Birch | 62c4f08 | 2020-01-17 16:13:26 +0000 | [diff] [blame] | 66 | cleanWs() |
| 67 | } |
| 68 | } |