- job: name: tcwg-llvm-build-christophe project-type: freestyle defaults: global properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-build - job-cancel - build-discarder: days-to-keep: 10 num-to-keep: 10 parameters: - string: name: build_container_tag default: 'xenial' description: 'Type of image to use in the container: trusty, xenial.' disabled: false node: tcwg-x86_64-build retry-count: 3 concurrent: true display-name: 'TCWG ZZZ LLVM Build Christophe' scm: - git: url: http://git.linaro.org/toolchain/jenkins-scripts.git refspec: +refs/heads/master:refs/remotes/origin/master name: origin branches: - refs/heads/master skip-tag: true shallow-clone: true wipe-workspace: true execution-strategy: sequential: false wrappers: - timeout: timeout: 300 - timestamps - build-name: name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}' builders: - shell: | #!/bin/bash set -ex mkdir -p ${WORKSPACE}/llvm ${WORKSPACE}/build ${WORKSPACE}/install # Start build container builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME) builder_arch=amd64 bash ${WORKSPACE}/start-container-docker.sh --arch ${builder_arch} --distro ${build_container_tag} --session-host ${builder} > build-container.sh # Define CONTAINER, CONTAINER_CLEANUP, session_host and session_port . ./build-container.sh BUILD_CONTAINER="${CONTAINER}" BUILD_CONTAINER_CLEANUP="${CONTAINER_CLEANUP}" # Make sure to cleanup build container if something goes # wrong when preparing the test environment if [ x"${BUILD_CONTAINER_CLEANUP}" != x ]; then CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}" if [ x"${SSH_AGENT_CLEANUP}" = x ]; then trap "${CONTAINERS_CLEANUP}" EXIT else trap "${CONTAINERS_CLEANUP} ; eval \`${SSH_AGENT_CLEANUP}\`" EXIT fi fi ${BUILD_CONTAINER} "cd ${WORKSPACE} && bash -x ${WORKSPACE}/tcwg-llvm-build.sh \ --srcdir=${WORKSPACE}/llvm \ --builddir=${WORKSPACE}/build \ --instdir=${WORKSPACE}/install"