blob: 71993b7e83a0379f19b18d295856bb5be8eaab87 [file] [log] [blame]
Dean Birch62c4f082020-01-17 16:13:26 +00001#!/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 Birchd0f9f8c2020-03-26 11:10:33 +00009@Library('trustedfirmware') _
10import org.trustedfirmware.Gerrit
11
Dean Birch62c4f082020-01-17 16:13:26 +000012node("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 Bircha6ede7e2020-03-13 14:00:33 +000040 url: params.MBEDCRYPTO_URL
Dean Birch62c4f082020-01-17 16:13:26 +000041 ]]
42 ]
43 )
44 }
45 sh """
Dean Bircha6ede7e2020-03-13 14:00:33 +000046# Host https://github.com/Arm-software/CMSIS_5/releases/download/5.5.0/ARM.CMSIS.5.5.0.pack
47# under \$JENKINS_HOME/userContent
48wget -O cmsis.pack -q \${JENKINS_URL}/userContent/ARM.CMSIS.${CMSIS_VERSION}.pack
Dean Birch62c4f082020-01-17 16:13:26 +000049unzip -o -d CMSIS_5 cmsis.pack
50"""
51 }
Dean Birchd0f9f8c2020-03-26 11:10:33 +000052 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 Birch62c4f082020-01-17 16:13:26 +000066 cleanWs()
67 }
68}