Skip to content
Permalink
Browse files

Create one watchdog image per arch

Signed-off-by: Richard Gee <richard@technologee.co.uk>
  • Loading branch information...
rgee0 authored and alexellis committed Apr 14, 2019
1 parent 5e2112a commit 9eafa0bfd79177e601df672a858dd07131cb3956
Showing with 23 additions and 9 deletions.
  1. +16 −4 .travis.yml
  2. +3 −4 watchdog/Dockerfile.packager
  3. +4 −1 watchdog/build.sh
@@ -32,13 +32,25 @@ after_success:
echo $QUAY_PASSWORD | docker login -u=$QUAY_USERNAME --password-stdin quay.io;
docker push quay.io/$DOCKER_NS/gateway:$TRAVIS_TAG;

docker tag $DOCKER_NS/watchdog:latest-dev $DOCKER_NS/watchdog:$TRAVIS_TAG;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-armhf $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-armhf;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-arm64 $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-arm64;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-windows $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-windows;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-x86_64 $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-x86_64;
echo $DOCKER_PASSWORD | docker login -u=$DOCKER_USERNAME --password-stdin;
docker push $DOCKER_NS/watchdog:$TRAVIS_TAG;
docker push $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-armhf;
docker push $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-arm64;
docker push $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-windows;
docker push $DOCKER_NS/classic-watchdog:$TRAVIS_TAG-x86_64;

docker tag $DOCKER_NS/watchdog:latest-dev quay.io/$DOCKER_NS/watchdog:$TRAVIS_TAG;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-armhf quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-armhf;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-arm64 quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-arm64;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-windows quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-windows;
docker tag $DOCKER_NS/classic-watchdog:latest-dev-x86_64 quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-x86_64;
echo $QUAY_PASSWORD | docker login -u=$QUAY_USERNAME --password-stdin quay.io;
docker push quay.io/$DOCKER_NS/watchdog:$TRAVIS_TAG;
docker push quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-armhf;
docker push quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-arm64;
docker push quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-windows;
docker push quay.io/$DOCKER_NS/classic-watchdog:$TRAVIS_TAG-x86_64;

fi

@@ -1,7 +1,6 @@
FROM openfaas/watchdog:build as build
FROM scratch

COPY --from=build /go/src/github.com/openfaas/faas/watchdog/watchdog ./fwatchdog
COPY --from=build /go/src/github.com/openfaas/faas/watchdog/watchdog-armhf ./fwatchdog-armhf
COPY --from=build /go/src/github.com/openfaas/faas/watchdog/watchdog-arm64 ./fwatchdog-arm64
COPY --from=build /go/src/github.com/openfaas/faas/watchdog/watchdog.exe ./fwatchdog.exe
ARG PLATFORM

COPY --from=build /go/src/github.com/openfaas/faas/watchdog/watchdog$PLATFORM ./fwatchdog
@@ -22,7 +22,10 @@ else
docker build --no-cache --build-arg VERSION=$VERSION --build-arg GIT_COMMIT=$GIT_COMMIT -t openfaas/watchdog:build .
fi

docker build --no-cache -t openfaas/watchdog:latest-dev . -f Dockerfile.packager
docker build --no-cache --build-arg PLATFORM="-armhf" -t openfaas/classic-watchdog:latest-dev-armhf . -f Dockerfile.packager
docker build --no-cache --build-arg PLATFORM="-arm64" -t openfaas/classic-watchdog:latest-dev-arm64 . -f Dockerfile.packager
docker build --no-cache --build-arg PLATFORM=".exe" -t openfaas/classic-watchdog:latest-dev-windows . -f Dockerfile.packager
docker build --no-cache --build-arg PLATFORM="" -t openfaas/classic-watchdog:latest-dev-x86_64 . -f Dockerfile.packager

docker create --name buildoutput openfaas/watchdog:build echo

0 comments on commit 9eafa0b

Please sign in to comment.
You can’t perform that action at this time.