Skip to content

Commit

Permalink
Add Shipyard support for deploying clusters
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mkolesnik committed May 21, 2024
1 parent c04a4b9 commit 4f05ba0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@

# Generated files
manifest.json

# Shipyard generated and downloaded
.dapper
Dockerfile.dapper
Makefile.shipyard
output/
5 changes: 5 additions & 0 deletions .shipyard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
nodes: control-plane worker
clusters:
cluster1:
cluster2:
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit 4f05ba0

Please sign in to comment.