diff --git a/.gitignore b/.gitignore index 825173c29..df7a2b849 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,9 @@ # Generated files manifest.json + +# Shipyard generated and downloaded +.dapper +Dockerfile.dapper +Makefile.shipyard +output/ diff --git a/.shipyard.yml b/.shipyard.yml new file mode 100644 index 000000000..75dde449a --- /dev/null +++ b/.shipyard.yml @@ -0,0 +1,5 @@ +--- +nodes: control-plane worker +clusters: + cluster1: + cluster2: diff --git a/Makefile b/Makefile index 49d0d97ec..4e945514b 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,15 @@ PLATFORMS ?= linux/amd64,linux/arm64 GOOS ?= linux GOARCH ?= amd64 +# Shipyard configuration +BASE_BRANCH = main +LOAD_BALANCER = true +ORG = skupperproject +PROJECT = skupper +SETTINGS = ./.shipyard.yml +SHIPYARD_URL = https://raw.githubusercontent.com/submariner-io/shipyard/devel +export BASE_BRANCH ORG PROJECT SHIPYARD_REPO SHIPYARD_URL + all: generate-client build-cmd build-get build-config-sync build-controllers build-tests build-manifest build-tests: @@ -142,3 +151,24 @@ release/arm64/skupper: cmd/skupper/skupper.go release/arm64.tgz: release/arm64/skupper tar -czf release/arm64.tgz release/arm64/skupper + +ifneq (,$(DAPPER_HOST_ARCH)) + +# Running in Shipyard's container + +include $(SHIPYARD_DIR)/Makefile.clusters + +else + +# Not running in Shipyard's container + +Makefile.shipyard: +ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS)))) + @echo Downloading $@ +endif + @curl -sfLO $(SHIPYARD_URL)/$@ + +ONLY_SHIPYARD_GOALS = true +include Makefile.shipyard + +endif