Skip to content

Instantly share code, notes, and snippets.

@rdimitrov
Forked from alexellis/publish-armhf.sh
Last active September 5, 2018 07:53
Show Gist options
  • Save rdimitrov/4373128eaf3b19cf83f0a29d3a5ce65b to your computer and use it in GitHub Desktop.
Save rdimitrov/4373128eaf3b19cf83f0a29d3a5ce65b to your computer and use it in GitHub Desktop.
Build and publish ARMv7 and ARMv8 Docker images for OpenFaaS
#!/bin/bash
declare -a repos=("faas" "faas-swarm" "nats-queue-worker" "faas-netes")
HERE=`pwd`
ARCH=$(uname -m)
rm -rf staging || :
mkdir -p staging
if [ "$ARCH" = "armv7l" ] ; then
ARM_VERSION="armhf"
elif [ "$ARCH" = "aarch64" ] ; then
ARM_VERSION="arm64"
fi
echo "Target architecture: ${ARM_VERSION}"
for i in "${repos[@]}"
do
cd $HERE
echo "$i"
git clone https://github.com/openfaas/$i ./staging/$i
cd ./staging/$i
pwd
export TAG=$(git describe --abbrev=0 --tags)
echo "Latest release: $TAG"
make ci-${ARM_VERSION}-build ci-${ARM_VERSION}-push
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment