Skip to content

Commit

Permalink
Add --nopull argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Aug 20, 2018
1 parent 10066d6 commit ecddff9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ci/docker-run.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
#!/bin/bash -e

usage() {
echo "Usage: $0 [docker image name] [command]"
echo "Usage: $0 [--nopull] [docker image name] [command]"
echo
echo Runs command in the specified docker image with
echo a CI-appropriate environment
echo a CI-appropriate environment.
echo
echo "--nopull Skip the dockerhub image update"
echo
}

cd "$(dirname "$0")/.."

NOPULL=false
if [[ $1 = --nopull ]]; then
NOPULL=true
shift
fi

IMAGE="$1"
if [[ -z "$IMAGE" ]]; then
echo Error: image not defined
exit 1
fi

docker pull "$IMAGE"
$NOPULL || docker pull "$IMAGE"
shift

ARGS=(
Expand Down

0 comments on commit ecddff9

Please sign in to comment.