k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/gencred/cloudbuild.yaml (about)

     1  # Copyright 2020 The Kubernetes Authors.
     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    - name: golang:$_GO_VERSION
    17      args:
    18      - go
    19      - build
    20      - -mod=readonly
    21      - -a
    22      - -installsuffix=cgo
    23      - -o=./gencred/gencred
    24      - ./gencred
    25      env:
    26      - CGO_ENABLED=0
    27      - GOOS=linux
    28      - GOARCH=amd64
    29    - name: gcr.io/cloud-builders/docker
    30      args:
    31      - build
    32      - --tag=gcr.io/$PROJECT_ID/gencred:$_GIT_TAG
    33      - --tag=gcr.io/$PROJECT_ID/gencred:latest
    34      - ./gencred
    35  substitutions:
    36    _GIT_TAG: '12345'
    37    _GO_VERSION: 1.18-alpine
    38  images:
    39    - 'gcr.io/$PROJECT_ID/gencred:$_GIT_TAG'
    40    - 'gcr.io/$PROJECT_ID/gencred:latest'