Skip to content

Commit fa7dd6b

Browse files
committed
Zip archive of sdk server server binaries for release
This creates a versions zip with all the os versions of the sdk server binary, so it can be distributed with development build, and final release. This also includes the step to upload it to a GCS bucket so it can be shared on pull requests to the project. Closes agones-dev#87
1 parent 86895cc commit fa7dd6b

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

build/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ build-agones-sdk-binary: ensure-build-image
136136
-o $(mount_path)/cmd/sdk-server/bin/sdk-server.darwin.amd64 $(go_version_flags) $(agones_package)/cmd/sdk-server
137137
docker run --rm -e "GOOS=windows" -e "GOARCH=amd64" $(common_mounts) $(build_tag) go build \
138138
-o $(mount_path)/cmd/sdk-server/bin/sdk-server.windows.amd64.exe $(go_version_flags) $(agones_package)/cmd/sdk-server
139+
docker run --rm $(common_mounts) -w $(mount_path)/cmd/sdk-server/bin/ $(build_tag) zip \
140+
agonessdk-server-$(VERSION).zip sdk-server.darwin.amd64 sdk-server.linux.amd64 sdk-server.windows.amd64.exe
139141

140142
# Build the image for the gameserver sidecar
141143
build-agones-sdk-image: ensure-build-image build-agones-sdk-binary

build/build-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
FROM grpc/cxx:1.8
2020

2121
RUN apt-get update && \
22-
apt-get install -y wget rsync make python bash-completion && \
22+
apt-get install -y wget rsync make python bash-completion zip && \
2323
apt-get clean
2424

2525
# install go

cloudbuild.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ steps:
3434
- name: 'gcr.io/cloud-builders/gsutil'
3535
dir: "sdks/cpp/bin"
3636
args: ['cp', '*.tar.gz', 'gs://agones-artifacts/cpp-sdk']
37+
- name: 'gcr.io/cloud-builders/gsutil'
38+
dir: "cmd/sdk-server/bin"
39+
args: ['cp', '*.zip', 'gs://agones-artifacts/sdk-server']
3740
- name: "make-docker"
3841
dir: "build"
3942
args: ["push-build-image"] # push the build image (which won't do anything if it's already there)

0 commit comments

Comments
 (0)