Skip to content

Commit

Permalink
MINOR: Adapt build procedure for new OpenShift certification/build
Browse files Browse the repository at this point in the history
standards
  • Loading branch information
dkorunic committed May 26, 2017
1 parent 84239b6 commit 94cd00d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Empty file modified Dockerfile
100644 → 100755
Empty file.
25 changes: 22 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/bin/sh
set -e

docker build -t=rhel7_haproxy .
docker save rhel7_haproxy | gzip > rhel7_haproxy.tar.gz
DOCKER_TAG="haproxy"
HAPROXY_REPO="p1458402064ad02bbe6a925de6df272994154a72a9"

HAPROXY_MINOR_OLD=$(awk '/^ENV HAPROXY_MINOR/ {print $NF}' Dockerfile)

./update.sh

HAPROXY_MINOR=$(awk '/^ENV HAPROXY_MINOR/ {print $NF}' Dockerfile)

if [ "x$1" != "xforce" ]; then
if [ "x$HAPROXY_MINOR_OLD" = "x$HAPROXY_MINOR" ]; then
echo "No new releases, not building anything."
exit 0
fi
fi

docker build -t "$DOCKER_TAG:$HAPROXY_MINOR" .
docker tag "$DOCKER_TAG:$HAPROXY_MINOR" "$DOCKER_TAG:latest"
docker tag "$DOCKER_TAG:$HAPROXY_MINOR" "registry.rhc4tp.openshift.com/$HAPROXY_REPO/$DOCKER_TAG:$HAPROXY_MINOR"
docker tag "$DOCKER_TAG:$HAPROXY_MINOR" "registry.rhc4tp.openshift.com/$HAPROXY_REPO/$DOCKER_TAG:latest"
docker push "registry.rhc4tp.openshift.com/$HAPROXY_REPO/$DOCKER_TAG:$HAPROXY_MINOR"
docker push "registry.rhc4tp.openshift.com/$HAPROXY_REPO/$DOCKER_TAG:latest"
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

DOCKERFILE=Dockerfile
HAPROXY_BRANCH=1.6
HAPROXY_BRANCH=1.7
HAPROXY_SRC_URL=http://www.haproxy.org/download/

HAPROXY_MINOR=$(curl -sfSL "$HAPROXY_SRC_URL/$HAPROXY_BRANCH/src/" | \
Expand Down

0 comments on commit 94cd00d

Please sign in to comment.