|
| 1 | +# Copyright 2022 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +steps: |
| 16 | +# Build the binary and put it into the builder image. |
| 17 | +- name: gcr.io/cloud-builders/docker |
| 18 | + args: |
| 19 | + - build |
| 20 | + - --tag=${_REGISTRY}/googlechat:${TAG_NAME} |
| 21 | + - --tag=${_REGISTRY}/googlechat:${_MAJOR_LATEST} |
| 22 | + - --tag=${_REGISTRY}/googlechat:latest |
| 23 | + - --file=./googlechat/Dockerfile |
| 24 | + - '.' |
| 25 | +# Run the smoketest to verify that everything built correctly. |
| 26 | +- name: ${_REGISTRY}/googlechat:${TAG_NAME} |
| 27 | + args: |
| 28 | + - --smoketest |
| 29 | + - --alsologtostderr |
| 30 | + |
| 31 | +# Push the image with tags. |
| 32 | +images: |
| 33 | +- ${_REGISTRY}/googlechat:${TAG_NAME} |
| 34 | +- ${_REGISTRY}/googlechat:${_MAJOR_LATEST} |
| 35 | +- ${_REGISTRY}/googlechat:latest |
| 36 | + |
| 37 | +options: |
| 38 | + dynamic_substitutions: true |
| 39 | + |
| 40 | +substitutions: |
| 41 | + _REGISTRY: us-east1-docker.pkg.dev/gcb-release/cloud-build-notifiers |
| 42 | + # Looks like: $NOTIF-$MAJOR-latest. Not meant for overriding. |
| 43 | + _MAJOR_LATEST: "${TAG_NAME%%.*}-latest" |
| 44 | + |
| 45 | +tags: |
| 46 | +- cloud-build-notifiers-googlechat |
| 47 | +- googlechat-${TAG_NAME} |
0 commit comments