Skip to content

Commit

Permalink
Merge pull request #171 from markmandel/feature/gen-install.yaml
Browse files Browse the repository at this point in the history
Generate the install.yaml from `helm template`
  • Loading branch information
markmandel authored Apr 10, 2018
2 parents 794dcdb + cd85ffe commit 797c29d
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 112 deletions.
20 changes: 19 additions & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,22 @@ build-images: build-controller-image build-agones-sdk-image
build-sdks: build-sdk-cpp

# Run all tests
test: ensure-build-image
test: ensure-build-image test-go test-install-yaml

# Run go tests
test-go:
docker run --rm $(common_mounts) $(build_tag) go test -race $(agones_package)/...

# Run test on install yaml - make sure there is no change
# mostly this is for CI
test-install-yaml:
-mkdir -p /tmp/agones-install
cp $(agones_path)/install/yaml/install.yaml /tmp/agones-install/install.yaml
sort /tmp/agones-install/install.yaml > /tmp/agones-install/install.yaml.sorted
$(MAKE) gen-install
sort $(agones_path)/install/yaml/install.yaml > /tmp/agones-install/install.current.yaml.sorted
diff /tmp/agones-install/install.yaml.sorted /tmp/agones-install/install.current.yaml.sorted

# Push all the images up to $(REGISTRY)
push: push-controller-image push-agones-sdk-image

Expand Down Expand Up @@ -149,6 +162,11 @@ build-sdk-cpp: ensure-build-image
push-agones-sdk-image: ensure-build-image
docker push $(sidecar_tag)

# Generate the static install script
gen-install: ensure-build-image
docker run --rm $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
'helm template --name=agones-manual $(mount_path)/install/helm/agones > $(mount_path)/install/yaml/install.yaml'

# Generate the SDK gRPC server and client code
gen-gameservers-sdk-grpc: ensure-build-image
docker run --rm $(common_mounts) -w $(mount_path) $(build_tag) /root/gen-grpc-go.sh
Expand Down
3 changes: 3 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ Compile the gameserver controller and then build the docker image
#### `make build-agones-sdk-image`
Compile the gameserver sidecar and then build the docker image

#### `make gen-install`
Generate the `/install/yaml/install.yaml` from the Helm template

#### `make gen-crd-client`
Generate the Custom Resource Definition client(s)

Expand Down
Loading

0 comments on commit 797c29d

Please sign in to comment.