agones.dev/agones@v1.54.0/build/release/post_cloudbuild.yaml (about) 1 --- 2 # Copyright 2023 Google LLC 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 steps: 16 17 # 18 # Clean out the working dir, so we can replace it. 19 # 20 - name: ubuntu 21 script: rm * 22 23 # 24 # Shallow clone of the release branch from the Agones repository 25 # 26 - name: gcr.io/cloud-builders/git 27 id: clone 28 args: 29 - clone 30 - --depth=1 31 - --branch=${_BRANCH_NAME} 32 - https://github.com/googleforgames/agones.git 33 - . 34 35 # 36 # Creates the initial make + docker build platform 37 # 38 - name: ubuntu 39 args: 40 - bash 41 - -c 42 - "echo 'FROM gcr.io/cloud-builders/docker:24.0.6\nRUN apt-get install make\nENTRYPOINT\ 43 \ [\"/usr/bin/make\"]' > Dockerfile.build" 44 - name: gcr.io/cloud-builders/docker:24.0.6 45 id: build-make-docker 46 args: [build, -f, Dockerfile.build, -t, make-docker, .] 47 48 # 49 # Build all the images 50 # 51 - name: make-docker 52 id: build-images 53 dir: build 54 env: 55 - VERSION=${_VERSION} 56 - REGISTRY=${_REGISTRY}/release 57 - FULL_BUILD=1 58 args: [-j, '1', build] 59 60 # 61 # push all the images 62 # 63 - name: make-docker 64 id: push-images 65 waitFor: [build-images] 66 dir: build 67 env: ['VERSION=${_VERSION}', 'REGISTRY=${_REGISTRY}/release'] 68 args: [-j, '1', push] 69 70 # 71 # Creating cloud storage bucket 72 # 73 - name: gcr.io/cloud-builders/gsutil 74 entrypoint: bash 75 args: [-c, gsutil mb $_STORAGE || true] 76 id: create-bucket 77 78 # 79 # Zip up artifacts and push to cloud storage 80 # 81 - name: gcr.io/cloud-builders/gsutil 82 waitFor: [build-images] 83 dir: cmd/sdk-server/bin 84 args: [-m, cp, '*.zip', $_STORAGE] 85 - name: gcr.io/cloud-builders/gsutil 86 waitFor: [build-images] 87 dir: sdks/cpp/.archives 88 args: [-m, cp, '*.tar.gz', $_STORAGE] 89 - name: gcr.io/cloud-builders/gsutil 90 entrypoint: bash 91 waitFor: [build-images] 92 dir: . 93 args: 94 - -c 95 - zip -r agones-install-${_VERSION}.zip ./README.md ./install ./LICENSE | gsutil 96 -m cp -r agones-install-${_VERSION}.zip $_STORAGE 97 98 # 99 # Pushes the current chart version to the helm repository hosted on gcs. 100 # 101 - name: make-docker 102 id: push-chart 103 waitFor: [build-images, push-images] 104 dir: build 105 env: ['VERSION=${_VERSION}', DOCKER_RUN_ARGS=--network=cloudbuild] 106 args: [push-chart] 107 options: 108 machineType: E2_HIGHCPU_32 109 dynamic_substitutions: true 110 substitutions: 111 _STORAGE: gs://${PROJECT_ID}-agones-releases 112 _REGISTRY: us-docker.pkg.dev/${PROJECT_ID} 113 timeout: 7200s