diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-03-22 15:07:17 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-03-22 15:14:43 +0000 |
commit | d8f441bc82e3c08ee93a1b11a1816f48bfe4965b (patch) | |
tree | 1e645375a7438287152f648987cce61aea65bb08 /tcwg-test-release.yaml | |
parent | 51d4163c01c92f5bbefe82740729c0d5ed2e752b (diff) |
tcwg-test-release: Use start-container scripts.
Change-Id: Id769ac993b97ccac17444d3700299741e47bd437
Diffstat (limited to 'tcwg-test-release.yaml')
-rw-r--r-- | tcwg-test-release.yaml | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/tcwg-test-release.yaml b/tcwg-test-release.yaml index 527dcb3c..71462586 100644 --- a/tcwg-test-release.yaml +++ b/tcwg-test-release.yaml @@ -23,6 +23,10 @@ default: refs/remotes/origin/master description: 'Scripts revision to use ' - string: + name: build_container_tag + default: 'trusty' + description: 'Distro to use for the container: trusty, xenial.' + - string: name: release default: description: 'Release name, only displayed in job name' @@ -35,7 +39,7 @@ default: false description: 'Whether to enable bash debugging output.' disabled: false - node: docker-trusty-amd64-tcwg + node: tcwg-x86_64-build retry-count: 3 concurrent: true workspace: /home/tcwg-buildslave/workspace/tcwg-test-release/$release/$target @@ -53,9 +57,6 @@ - timeout: timeout: 300 - timestamps - - ssh-agent-credentials: - users: - - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' # tcwg-buildslave - build-name: name: '#${BUILD_NUMBER}-${ENV,var="release"}-${ENV,var="target"}' builders: @@ -76,7 +77,29 @@ exit 1 fi - ${shell} ${WORKSPACE}/TestRelease.job --tarball ${tarball_url} + # Start build container + builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME) + build_container_type=docker + # We currently test i686 releases on x86_64 hosts + builder_arch=amd64 + bash -x ${WORKSPACE}/start-container-${build_container_type}.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 + 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} && ${shell} ${WORKSPACE}/TestRelease.job --tarball ${tarball_url}" exit $? publishers: |