Skip to content

Fix travis CI config to fail on error properly, fix Multiarch build #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ go:
- "1.17.x"

env:
- VERBOSE=1 GOIMAGE=gcr.io/gcr-for-testing/golang:1.17.13 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb:3.9.2 STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 MULTIARCH=0 GOIMAGE=gcr.io/gcr-for-testing/golang:1.17.13 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb:3.9.2 STARTER_MODES="single,cluster,activefailover"

install:
- make init

script:
- |
set -e
make license-verify fmt-verify linter
make run-unit-tests
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ! -z "$ALWAYS" ]; then
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ VERSION_MAJOR := $(shell echo $(VERSION_MAJOR_MINOR) | cut -f 1 -d '.')
COMMIT := $(shell git rev-parse --short HEAD)
MAKEFILE := $(ROOTDIR)/Makefile

ifndef MULTIARCH
MULTIARCH:=1
endif
MULTIARCH ?= 1

ALPINE_IMAGE ?= alpine:3.11

Expand Down Expand Up @@ -170,16 +168,15 @@ $(TESTBIN): $(GOBUILDDIR) $(TEST_SOURCES) $(BIN)
@mkdir -p $(BINDIR)
$(DOCKER_CMD) go test -c -o "$(TEST_BIN)" ./test

ifndef MULTIARCH
ifneq ($(MULTIARCH),1)
docker: build
$(DOCKERCLI) build -t arangodb/arangodb-starter --build-arg "IMAGE=$(ALPINE_IMAGE)" .
else
docker: binaries
$(DOCKERCLI) buildx build -f "$(ROOTDIR)/Dockerfile.ma" --build-arg "IMAGE=$(ALPINE_IMAGE)" \
--platform linux/amd64,linux/arm64 -t arangodb/arangodb-starter .
$(DOCKERMACLI) -t arangodb/arangodb-starter .
endif

ifndef MULTIARCH
ifneq ($(MULTIARCH),1)
docker-push: docker
ifneq ($(DOCKERNAMESPACE), arangodb)
docker tag arangodb/arangodb-starter $(DOCKERNAMESPACE)/arangodb-starter
Expand All @@ -190,7 +187,7 @@ docker-push: docker
$(DOCKERMACLI) --push -t $(DOCKERNAMESPACE)/arangodb-starter .
endif

ifndef MULTIARCH
ifneq ($(MULTIARCH),1)
docker-push-version: docker
docker tag arangodb/arangodb-starter arangodb/arangodb-starter:$(VERSION)
docker tag arangodb/arangodb-starter arangodb/arangodb-starter:$(VERSION_MAJOR_MINOR)
Expand Down