File: ci-in-docker.sh

package info (click to toggle)
python-awscurl 0.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 967; sh: 90; makefile: 18
file content (18 lines) | stat: -rwxr-xr-x 510 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset
set -o xtrace

docker_run() {
    local image_type=$1
    local script_file=$2
    echo "building ${image_type} image -- first time it could take a few minutes"
    docker build -t "awscurl-ci-${image_type}" -f "./ci/ci-${image_type}/Dockerfile" . &&
    docker run --rm -t "awscurl-ci-${image_type}" bash -c "${script_file}"
}

docker_run "ubuntu" "./scripts/ci.sh"
docker_run "alpine" "./scripts/ci.sh"
docker_run "centos" "./scripts/ci.sh"