mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 21:06:54 +00:00
This reviews the code and fixes up suggestions made by team for the HTTP paths PR #789. - Removed feature-flag (this is backwards-compatible, so I see no value in adding the flag) - There was a URL transform happening for calls proxied to the back end, I changed this for the nil-transform - i.e. it does not change anything in the URL - Introduced variables to describe the regex indicies used in the URL trimming. Tested with Docker Swarm with a ruby-microservice, with system calls and with function calls using the UI. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
34 lines
834 B
Bash
Executable File
34 lines
834 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
export dockerfile="Dockerfile"
|
|
export arch=$(uname -m)
|
|
|
|
export eTAG="latest-dev"
|
|
|
|
if [ "$arch" = "armv7l" ] ; then
|
|
dockerfile="Dockerfile.armhf"
|
|
eTAG="latest-armhf-dev"
|
|
fi
|
|
|
|
echo "$1"
|
|
if [ "$1" ] ; then
|
|
eTAG=$1
|
|
if [ "$arch" = "armv7l" ] ; then
|
|
eTAG="$1-armhf"
|
|
fi
|
|
fi
|
|
|
|
NS=openfaas
|
|
|
|
echo Building $NS/gateway:$eTAG
|
|
|
|
GIT_COMMIT_MESSAGE=$(git log -1 --pretty=%B 2>&1 | head -n 1)
|
|
GIT_COMMIT_SHA=$(git rev-list -1 HEAD)
|
|
VERSION=$(git describe --all --exact-match `git rev-parse HEAD` | grep tags | sed 's/tags\///' || echo dev)
|
|
|
|
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
|
|
--build-arg GIT_COMMIT_MESSAGE="$GIT_COMMIT_MESSAGE" --build-arg GIT_COMMIT_SHA=$GIT_COMMIT_SHA \
|
|
--build-arg VERSION=${VERSION:-dev} \
|
|
-t $NS/gateway:$eTAG . -f $dockerfile --no-cache
|