Ignore reaper error (#974)

This commit is contained in:
yfei1
2019-11-13 08:25:02 -08:00
committed by Saurabh Wagh
parent 7005d40939
commit 1f5df7abef
4 changed files with 7 additions and 75 deletions

View File

@ -202,7 +202,7 @@ ALL_PROTOS = $(GOLANG_PROTOS) $(SWAGGER_JSON_DOCS) $(CSHARP_PROTOS)
CMDS = $(notdir $(wildcard cmd/*))
# Names of the individual images, ommiting the openmatch prefix.
IMAGES = $(CMDS) mmf-go-soloduel mmf-go-pool mmf-go-rosterbased evaluator-go-simple reaper stress-frontend base-build
IMAGES = $(CMDS) mmf-go-soloduel mmf-go-pool mmf-go-rosterbased evaluator-go-simple stress-frontend base-build
help:
@cat Makefile | grep ^\#\# | grep -v ^\#\#\# |cut -c 4-
@ -251,9 +251,6 @@ build-mmf-go-pool-image: docker build-base-build-image
build-evaluator-go-simple-image: docker build-base-build-image
docker build -f examples/evaluator/golang/simple/Dockerfile -t $(REGISTRY)/openmatch-evaluator-go-simple:$(TAG) -t $(REGISTRY)/openmatch-evaluator-go-simple:$(ALTERNATE_TAG) .
build-reaper-image: docker build-base-build-image
docker build -f tools/reaper/Dockerfile -t $(REGISTRY)/openmatch-reaper:$(TAG) -t $(REGISTRY)/openmatch-reaper:$(ALTERNATE_TAG) .
build-stress-frontend-image: docker
docker build -f test/stress/Dockerfile -t $(REGISTRY)/openmatch-stress-frontend:$(TAG) -t $(REGISTRY)/openmatch-stress-frontend:$(ALTERNATE_TAG) .
@ -884,7 +881,7 @@ else
endif
ci-reap-namespaces: build/toolchain/bin/reaper$(EXE_EXTENSION)
$(TOOLCHAIN_BIN)/reaper -age=30m
-$(TOOLCHAIN_BIN)/reaper -age=30m
# For presubmit we want to update the protobuf generated files and verify that tests are good.
presubmit: GOLANG_TEST_COUNT = 5
@ -940,7 +937,7 @@ clean-binaries:
clean-terraform:
rm -rf $(REPOSITORY_ROOT)/install/terraform/.terraform/
clean-build: clean-toolchain clean-archives clean-release clean-chart
clean-build: clean-toolchain clean-release clean-chart
rm -rf $(BUILD_DIR)/
clean-release:
@ -952,9 +949,6 @@ clean-toolchain:
clean-chart:
rm -rf $(BUILD_DIR)/chart/
clean-archives:
rm -rf $(BUILD_DIR)/archives/
clean-install-yaml:
rm -f $(REPOSITORY_ROOT)/install/yaml/*
@ -1074,12 +1068,6 @@ sync-deps:
$(GO) clean -modcache
$(GO) mod download
sleep-10:
sleep 10
sleep-30:
sleep 30
# Prevents users from running with sudo.
# There's an exception for Google Cloud Build because it runs as root.
no-sudo:
@ -1092,4 +1080,4 @@ ifeq ($(shell whoami),root)
endif
endif
.PHONY: docker gcloud update-deps sync-deps sleep-10 sleep-30 all build proxy-dashboard proxy-prometheus proxy-grafana clean clean-build clean-toolchain clean-archives clean-binaries clean-protos presubmit test ci-reap-namespaces md-test vet
.PHONY: docker gcloud update-deps sync-deps all build proxy-dashboard proxy-prometheus proxy-grafana clean clean-build clean-toolchain clean-binaries clean-protos presubmit test ci-reap-namespaces md-test vet

View File

@ -1,56 +0,0 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM open-match-base-build as builder
WORKDIR /go/src/open-match.dev/open-match/tools/reaper/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
FROM gcr.io/distroless/static:nonroot
WORKDIR /app/
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/tools/reaper/reaper /app/
ENTRYPOINT ["/app/reaper"]
# Docker Image Arguments
ARG BUILD_DATE
ARG VCS_REF
ARG BUILD_VERSION
ARG IMAGE_TITLE="Open Match CI Reaper"
# Standardized Docker Image Labels
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL \
org.opencontainers.image.created="${BUILD_TIME}" \
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
org.opencontainers.image.url="https://open-match.dev/" \
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
org.opencontainers.image.source="https://github.com/googleforgames/open-match" \
org.opencontainers.image.version="${BUILD_VERSION}" \
org.opencontainers.image.revision="1" \
org.opencontainers.image.vendor="Google LLC" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="" \
org.opencontainers.image.title="${IMAGE_TITLE}" \
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.url="http://open-match.dev/" \
org.label-schema.vcs-url="https://github.com/googleforgames/open-match" \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="Google LLC" \
org.label-schema.name="${IMAGE_TITLE}" \
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
org.label-schema.usage="https://open-match.dev/site/docs/"

View File

@ -47,7 +47,7 @@ func gameModes() []string {
}
var result []string
for k, _ := range selected {
for k := range selected {
result = append(result, k)
}

View File

@ -43,7 +43,7 @@ func gameModes() []string {
modes := []string{"mode.demo", "mode.ctf", "mode.battleroyale", "mode.2v2"}
count := rand.Intn(2) + 1
selected := make(map[string]bool)
for i:=0; i<count; i++ {
for i := 0; i < count; i++ {
mode := modes[rand.Intn(len(modes))]
if !selected[mode] {
selected[mode] = true
@ -51,7 +51,7 @@ func gameModes() []string {
}
var result []string
for k, _ := range selected {
for k := range selected {
result = append(result, k)
}