Skip to content

Commit

Permalink
Merge pull request #161 from xiekeyang/nobuild
Browse files Browse the repository at this point in the history
add NOBUILD ARG to script
  • Loading branch information
erwinvaneyk authored Jul 6, 2018
2 parents e8b5f22 + d7a3bed commit fac0e21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /go/src/github.com/fission/fission-workflows

COPY . .

RUN if [ "_$NOBUILD" = "_" ] ; then \
RUN if ! $NOBUILD ; then \
go get github.com/Masterminds/glide; \
glide install -v; \
build/build-linux.sh; \
Expand All @@ -19,4 +19,4 @@ RUN if [ "_$NOBUILD" = "_" ] ; then \
FROM scratch

COPY --from=builder /go/src/github.com/fission/fission-workflows/fission-workflows-bundle /fission-workflows-bundle
COPY --from=builder /go/src/github.com/fission/fission-workflows/wfcli /wfcli
COPY --from=builder /go/src/github.com/fission/fission-workflows/wfcli /wfcli
5 changes: 3 additions & 2 deletions build/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ set -eo pipefail
BUILD_ROOT=$(dirname $0)
IMAGE_REPO=${1:-fission}
IMAGE_TAG=${2:-latest}
NOBUILD=${3:-false}

# Build bundle images
bundleImage=${IMAGE_REPO}/fission-workflows-bundle
pushd ${BUILD_ROOT}/..
if [ ! -z "$NOBUILD" ]; then
if $NOBUILD ; then
if [ ! -f ./fission-workflows-bundle ]; then
echo "Executable './fission-workflows-bundle' not found!"
exit 1;
Expand Down Expand Up @@ -47,4 +48,4 @@ docker build --tag="${IMAGE_REPO}/wfcli:${IMAGE_TAG}" ${BUILD_ROOT}/wfcli/ \
--build-arg BUNDLE_TAG=${IMAGE_TAG}

# Remove intermediate images
# docker rmi $(docker images -f "dangling=true" -q)
# docker rmi $(docker images -f "dangling=true" -q)

0 comments on commit fac0e21

Please sign in to comment.