Skip to content

Commit 9d252ec

Browse files
committed
Add Shipyard support for deploying clusters
This allows to quickly and easily deploy clusters (kind, ocp, acm) for testing. The kind clusters run locally and can be used for development, quick testing and CI. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
1 parent e5248c1 commit 9d252ec

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@
3030

3131
# Generated files
3232
manifest.json
33+
34+
# Shipyard generated and downloaded
35+
.dapper
36+
Dockerfile.dapper
37+
Makefile.shipyard
38+
output/

.shipyard.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
nodes: control-plane worker
3+
clusters:
4+
cluster1:
5+
cluster2:

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ PLATFORMS ?= linux/amd64,linux/arm64
1212
GOOS ?= linux
1313
GOARCH ?= amd64
1414

15+
# Shipyard configuration
16+
BASE_BRANCH = main
17+
LOAD_BALANCER = true
18+
ORG = skupperproject
19+
PROJECT = skupper
20+
SETTINGS = ./.shipyard.yml
21+
SHIPYARD_URL = https://raw.githubusercontent.com/submariner-io/shipyard/devel
22+
export BASE_BRANCH ORG PROJECT SHIPYARD_REPO SHIPYARD_URL
23+
1524
all: generate-client build-cmd build-get build-config-sync build-controllers build-tests build-manifest
1625

1726
build-tests:
@@ -142,3 +151,24 @@ release/arm64/skupper: cmd/skupper/skupper.go
142151

143152
release/arm64.tgz: release/arm64/skupper
144153
tar -czf release/arm64.tgz release/arm64/skupper
154+
155+
ifneq (,$(DAPPER_HOST_ARCH))
156+
157+
# Running in Shipyard's container
158+
159+
include $(SHIPYARD_DIR)/Makefile.clusters
160+
161+
else
162+
163+
# Not running in Shipyard's container
164+
165+
Makefile.shipyard:
166+
ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS))))
167+
@echo Downloading $@
168+
endif
169+
@curl -sfLO $(SHIPYARD_URL)/$@
170+
171+
ONLY_SHIPYARD_GOALS = true
172+
include Makefile.shipyard
173+
174+
endif

0 commit comments

Comments
 (0)