# Copyright 2020 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. timeout: 900s options: env: - "GOPATH=/workspace/GOPATH" - "CGO_ENABLED=0" steps: - id: linux.amd64 name: "golang:1.17" env: - "GOOS=linux" - "GOARCH=amd64" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: linux.386 name: "golang:1.17" env: - "GOOS=linux" - "GOARCH=386" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: linux.arm64 name: "golang:1.17" env: - "GOOS=linux" - "GOARCH=arm64" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: linux.arm name: "golang:1.17" env: - "GOOS=linux" - "GOARCH=arm" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: darwin.amd64 name: "golang:1.17" env: - "GOOS=darwin" - "GOARCH=amd64" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: darwin.arm64 name: "golang:1.17" env: - "GOOS=darwin" - "GOARCH=arm64" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy.$$GOOS.$$GOARCH ./cmd/cloud_sql_proxy' - id: windows.amd64 name: "golang:1.17" env: - "GOOS=windows" - "GOARCH=amd64" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy_x64.exe ./cmd/cloud_sql_proxy' - id: windows.386 name: "golang:1.17" env: - "GOOS=windows" - "GOARCH=386" entrypoint: "bash" args: - "-c" - 'go build -ldflags "-X main.versionString=${_VERSION} -X main.metadataString=$$GOOS.$$GOARCH" -o cloud_sql_proxy_x86.exe ./cmd/cloud_sql_proxy' artifacts: objects: location: "gs://cloudsql-proxy/v${_VERSION}/" paths: - "cloud_sql_proxy*"