| #!/usr/bin/env groovy |
| //------------------------------------------------------------------------------- |
| // Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. |
| // |
| // SPDX-License-Identifier: BSD-3-Clause |
| // |
| //------------------------------------------------------------------------------- |
| |
| @Library('trustedfirmware') _ |
| import org.trustedfirmware.Gerrit |
| |
| node("docker-amd64-xenial") { |
| stage("Init") { |
| cleanWs() |
| dir("trusted-firmware-m") { |
| checkout( |
| poll: false, |
| scm: [ |
| $class: 'GitSCM', |
| branches: [[name: '$GERRIT_BRANCH']], |
| extensions: [[$class: 'BuildChooserSetting', buildChooser: [$class: 'GerritTriggerBuildChooser']]], |
| userRemoteConfigs: [[ |
| credentialsId: 'GIT_SSH_KEY', |
| refspec: '$GERRIT_REFSPEC', url: '$CODE_REPO' |
| ]] |
| ]) |
| } |
| dir("tf-m-ci-scripts") { |
| git url: '$CI_SCRIPTS_REPO', branch: 'master', credentialsId: 'GIT_SSH_KEY' |
| } |
| dir("mbed-crypto") { |
| checkout( |
| changelog: false, |
| poll: false, |
| scm: [ |
| $class: 'GitSCM', |
| branches: [[name: 'FETCH_HEAD']], |
| userRemoteConfigs: [[ |
| refspec: 'refs/tags/$MBEDCRYPTO_VERSION', |
| url: params.MBEDCRYPTO_URL |
| ]] |
| ] |
| ) |
| } |
| sh """ |
| # Host https://github.com/Arm-software/CMSIS_5/releases/download/5.5.0/ARM.CMSIS.5.5.0.pack |
| # under \$JENKINS_HOME/userContent |
| wget -O cmsis.pack -q \${JENKINS_URL}/userContent/ARM.CMSIS.${CMSIS_VERSION}.pack |
| unzip -o -d CMSIS_5 cmsis.pack |
| """ |
| } |
| try { |
| verify = 1 |
| stage("Build") { |
| sh "tf-m-ci-scripts/build-docs.sh" |
| } |
| stage("Post") { |
| archiveArtifacts 'trusted-firmware-m/build/install/**' |
| } |
| } catch (Exception e) { |
| manager.buildFailure() |
| verify = -1 |
| } finally { |
| g = new Gerrit() |
| g.verifyStatusInWorkspace(verify, 'tf-m-build-docs', 'build') |
| cleanWs() |
| } |
| } |