#!/bin/bash set -euf -o pipefail scripts=$(dirname $0) # shellcheck source=jenkins-helpers.sh . $scripts/jenkins-helpers.sh convert_args_to_variables "$@" obligatory_variables NODE_NAME password declare NODE_NAME password distro="${distro-bionic}" force="${force-false}" master="${master-silent}" verbose="${verbose-true}" if $verbose; then set -x; fi if $force; then keep_existing=false else keep_existing=keep_if_same_image fi case "$NODE_NAME:$master" in tcwg-amp-05:normal) bots=( linaro-lldb-arm-ubuntu linaro-lldb-aarch64-ubuntu ) ;; tcwg-amp-05:buildkite) bots=( # 1 bot per AArch64 config to limit the # total build time to 1x the slowest config linaro-aarch64-libcxx-01 linaro-aarch64-libcxx-02 ) ;; tcwg-amp-06:buildkite) bots=( # These can all build any v7/8 config. # 4 because there's 4 combinations. # exceptions/no exceptions armv7/armv8 # 1 bot per config limits total build # time to 1x the slowest bot. linaro-armv8-libcxx-01 linaro-armv8-libcxx-02 linaro-armv8-libcxx-03 linaro-armv8-libcxx-04 ) ;; tcwg-fx-02:normal) bots=( linaro-clang-aarch64-sve-vls linaro-clang-aarch64-sve-vls-2stage ) ;; tcwg-jade-01:normal) bots=( # Bots in same order as in llvm-zorg/.../workers.py linaro-clang-armv7-lnt linaro-clang-armv7-2stage linaro-clang-armv7-quick linaro-clang-armv7-global-isel linaro-clang-armv7-vfpv3-2stage linaro-clang-armv8-lld-2stage linaro-clang-aarch64-quick linaro-clang-aarch64-lld-2stage linaro-clang-aarch64-global-isel linaro-clang-aarch64-full-2stage linaro-flang-aarch64-dylib linaro-flang-aarch64-sharedlibs linaro-flang-aarch64-out-of-tree linaro-flang-aarch64-debug linaro-flang-aarch64-latest-clang linaro-flang-aarch64-release linaro-flang-aarch64-rel-assert linaro-flang-aarch64-latest-gcc ) ;; tcwg-llvmbot_tk1-09:silent) # Connect linaro-tk1-09 to silent buildmaster to test its stability bots=("$(echo "$NODE_NAME" | sed -e "s/tcwg-llvmbot_/linaro-/")") ;; tcwg-llvmbot_tk1-09:normal) ;; tcwg-llvmbot_tk1-*:normal) bots=("$(echo "$NODE_NAME" | sed -e "s/tcwg-llvmbot_/linaro-/")") ;; esac for bot in "${bots[@]+${bots[@]}}"; do case "$bot" in linaro-*aarch64-*) arch="arm64" ;; linaro-*arm*|linaro-tk1-*) arch="armhf" ;; *) echo "ERROR: Unknown bot: $bot"; exit 1 ;; esac image="linaro/ci-$arch-tcwg-llvmbot-ubuntu:$distro" $scripts/tcwg-start-container.sh \ --container "$master-$bot" \ --image "$image" \ --keep_existing "$keep_existing" \ --verbose "$verbose" \ -- \ $image $master $bot $password done