Skip to content
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

Generate the install.yaml from helm template #171

Merged
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
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