File: push_images.sh

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

set -xeu

SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
CONTAINER_REPOSITORY="aelsabbahy"
images=$(docker images | grep "^$CONTAINER_REPOSITORY/goss_.*latest" | awk '$0=$1')

# Use md5sum to determine if CI needs to do a docker build
pushd "$SCRIPT_DIR/../integration-tests";
  for dockerfile in Dockerfile_*;do
    [[ $dockerfile == *.md5 ]] && continue
    md5sum "$dockerfile" > "${dockerfile}.md5"
  done
popd

for image in $images; do
  docker push "${image}:latest"
done