Giter Site home page Giter Site logo

terrorizer1980 / cloud-provider-gcp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubernetes/cloud-provider-gcp

0.0 0.0 0.0 78.52 MB

License: Apache License 2.0

Go 50.94% Shell 37.80% Starlark 2.65% Dockerfile 0.27% Makefile 0.38% sed 0.07% Ruby 0.03% PowerShell 7.86%

cloud-provider-gcp's Introduction

cloud-provider-gcp

Publishing gcp-controller-manager image

This command will build and publish gcr.io/k8s-image-staging/gcp-controller-manager:latest:

bazel run //cmd/gcp-controller-manager:publish

Environment variables IMAGE_REGISTRY, IMAGE_REPO and IMAGE_TAG can be used to override destination GCR repository and tag.

This command will build and publish example.com/my-repo/gcp-controller-manager:v1:

IMAGE_REGISTRY=example.com IMAGE_REPO=my-repo IMAGE_TAG=v1 bazel run //cmd/gcp-controller-manager:publish

Cross-compiling

Selecting the target platform is done with the --platforms option with bazel. This command builds release tarballs for Windows:

bazel build --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //release:release-tars

This command explicitly targets Linux as the target platform:

bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //release:release-tars

Dependency management

Dependencies are managed using Go modules (go mod subcommands).

Note that builds are done with Bazel and not the Go tool. Don't follow public Go module docs, instead use instructions in this readme.

Working within GOPATH

If you work within GOPATH, go mod will error out unless you do one of:

  • move repo outside of GOPATH (it should "just work")
  • set env var GO111MODULE=on

Add a new dependency

go get github.com/new/dependency && ./tools/update_vendor.sh

Update an existing dependency

go get -u github.com/existing/dependency && ./tools/update_vendor.sh

Update all dependencies

go get -u && ./tools/update_vendor.sh

Note that this most likely won't work due to cross-dependency issues or repos not implementing modules correctly.

Clean up unused dependencies

go mod tidy && ./tools/update_vendor.sh

Bazel

Bazel is required to build and release cloud-provider-gcp.

To install:

go get github.com/bazelbuild/bazelisk
alias bazel=bazelisk

To re-generate BUILD files:

tools/update_bazel.sh

cloud-provider-gcp's People

Contributors

a-robinson avatar agau4779 avatar amwat avatar awly avatar bowei avatar bprashanth avatar cheftako avatar cici37 avatar dangerontheranger avatar danielywong avatar erikmcc avatar freehan avatar hoskeri avatar ixdy avatar jingax10 avatar jpbetz avatar jsafrane avatar justinsb avatar k8s-ci-robot avatar k8s-github-robot avatar liggitt avatar michaelmdresser avatar mikedanese avatar mrhohn avatar saad-ali avatar sambdavidson avatar verult avatar vinayakankugoyal avatar yujuhong avatar zmerlynn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.