agones.dev/agones@v1.54.0/ci/perf-test-cloudbuild.yaml (about)

     1  ---
     2  # Copyright 2023 Google LLC All Rights Reserved.
     3  #
     4  # Licensed under the Apache License, Version 2.0 (the "License");
     5  # you may not use this file except in compliance with the License.
     6  # You may obtain a copy of the License at
     7  #
     8  #     http://www.apache.org/licenses/LICENSE-2.0
     9  #
    10  # Unless required by applicable law or agreed to in writing, software
    11  # distributed under the License is distributed on an "AS IS" BASIS,
    12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  # See the License for the specific language governing permissions and
    14  # limitations under the License.
    15  #
    16  # Google Cloud Builder CI configuration
    17  #
    18  steps:
    19    #
    20    # Creates the initial make + docker build platform
    21    #
    22    - name: ubuntu
    23      args:
    24        - bash
    25        - -c
    26        - "echo 'FROM gcr.io/cloud-builders/docker:24.0.6\nRUN apt-get install make\nENTRYPOINT\
    27          \ [\"/usr/bin/make\"]' > Dockerfile.build"
    28      waitFor: ['-']
    29  
    30    - name: gcr.io/cloud-builders/docker:24.0.6
    31      id: build-make-docker
    32      args: [build, -f, Dockerfile.build, -t, make-docker, .]  # we need docker and make to run everything.
    33  
    34    #
    35    # pull the main build image if it exists
    36    #
    37    - name: make-docker
    38      id: pull-build-image
    39      dir: build
    40      env: ['REGISTRY=${_REGISTRY}']
    41      args: [pull-build-image]
    42      waitFor:
    43        - build-make-docker
    44  
    45    #
    46    # add tag to build image
    47    #
    48    - name: make-docker
    49      id: tag-build-image
    50      dir: build
    51      env: ['CUSTOM_LOCAL_TAG=performance-test']
    52      args: [tag-build-image]
    53      waitFor:
    54        - pull-build-image
    55  
    56    #
    57    # Build all the images and sdks, and push them up to the repository
    58    #
    59  
    60    - name: "make-docker"
    61      id: build-images
    62      waitFor:
    63        - pull-build-image
    64      dir: "build"
    65      env:
    66        - "REGISTRY=${_REGISTRY}"
    67      args: ["-j", "4", "build-images"]
    68    - name: "make-docker"
    69      id: push-images
    70      waitFor:
    71        - build-images
    72      dir: "build"
    73      env:
    74        - "REGISTRY=${_REGISTRY}"
    75      args: ["-j", "4", "push"]
    76  
    77    #
    78    # Run the performance tests with default feature gates setting
    79    #
    80    - name: performance-test
    81      dir: build
    82      args:
    83        - ./performance-test.sh
    84        - ${_TEST_CLUSTER_NAME}
    85        - ${_TEST_CLUSTER_LOCATION}
    86        - ${_REGISTRY}
    87        - ${_TEST_PROJECT_ID}
    88        - ${_TEST_FLEET_REPLICAS}
    89        - ${_TEST_AUTOMATIC_SHUTDOWN_DELAY_SEC}
    90        - ${_TEST_BUFFER_SIZE}
    91        - ${_TEST_MAX_REPLICAS}
    92        - ${_TEST_DURATION}
    93        - ${_TEST_CLIENTS}
    94        - ${_TEST_INTERVAL}
    95      id: performance-test
    96      waitFor:
    97        - tag-build-image
    98  
    99  substitutions:
   100    _TEST_CLUSTER_NAME: standard-performance-test-cluster-1-33
   101    _TEST_CLUSTER_LOCATION: us-central1
   102    _REGISTRY: us-docker.pkg.dev/agones-images/ci
   103    _TEST_PROJECT_ID: agones-images
   104    _TEST_FLEET_REPLICAS: "10000"
   105    _TEST_AUTOMATIC_SHUTDOWN_DELAY_SEC: "60"
   106    _TEST_BUFFER_SIZE: "9900"
   107    _TEST_MAX_REPLICAS: "20000"
   108    _TEST_DURATION: "10m"
   109    _TEST_CLIENTS: "50"
   110    _TEST_INTERVAL: "1000"
   111  tags: [perf, 'commit-${COMMIT_SHA}']
   112  timeout: 7200s  # 2h
   113  queueTtl: 10800s  # 3h
   114  options:
   115    machineType: E2_HIGHCPU_32
   116    dynamic_substitutions: true