summaryrefslogtreecommitdiff
path: root/tcwg-update-host-containers.sh
blob: fc614c088ecaf708b8436b2b9d3b4f54168b5f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

set -ef -o pipefail

. $(dirname $0)/jenkins-helpers.sh
convert_args_to_variables "$@"

container="${container:-jenkins}"
distro="${distro:-xenial}"
verbose="${verbose:-true}"

set -u

if $verbose; then set -x; fi

image="linaro/ci-$(print_arch_for_host localhost)-tcwg-host-ubuntu:$distro"
docker pull "$image"

docker run --rm $image start.sh > start.sh
if docker inspect $container >/dev/null 2>&1; then
    docker rm -vf $container
fi

group="all"
if [ x"$container" = x"jenkins" ]; then
    group="tcwg-infra"
fi

bash start.sh --task $container --verbose $verbose -- $image $group