blob: bc284b2120d55fd2a55be218f8d196e0b30f1464 [file] [log] [blame]
#!/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: '$CI_SCRIPTS_BRANCH', 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
set +e
wget -O cmsis.pack -q \${JENKINS_URL}/userContent/ARM.CMSIS.${CMSIS_VERSION}.pack
if [ "\$?" != "0" ] ; then
set -e
wget -O cmsis.pack -q https://github.com/Arm-software/CMSIS_5/releases/download/${CMSIS_VERSION}/ARM.CMSIS.${CMSIS_VERSION}.pack
fi
set -e
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')
def buildStatus = (verify == 1) ? 'Successful' : 'Failed'
//g.commentInWorkspace("Build docs ${buildStatus}: ${env.RUN_DISPLAY_URL}")
cleanWs()
}
}