forked from kubernetes-sigs/kind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebff70a
commit 501d37c
Showing
7 changed files
with
142 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# build outputs | ||
/bazel-* | ||
/_artifacts | ||
/_output | ||
|
||
# macoOS | ||
.DS_Store | ||
|
||
# Files generated by IDEs, e.g. IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
.vscode/* | ||
*.swp | ||
*.sublime-project | ||
*.sublime-workspace | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# bazel workspace, see: https://bazel.build/ | ||
|
||
# rules for rules go current stable release below | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "io_bazel_rules_go", | ||
sha256 = "97cf62bdef33519412167fd1e4b0810a318a7c234f5f8dc4f53e2da86241c492", | ||
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.15.3/rules_go-0.15.3.tar.gz"], | ||
) | ||
|
||
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") | ||
|
||
go_rules_dependencies() | ||
|
||
go_register_toolchains() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"GoPrefix": "k8s.io/test-infra", | ||
"AddSourcesRules": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2016 The Kubernetes Authors. | ||
# | ||
# 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. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
|
||
# https://github.com/kubernetes/test-infra/issues/5699#issuecomment-348350792 | ||
cd ${REPO_ROOT} | ||
TMP_GOPATH=$(mktemp -d) | ||
|
||
cleanup() { | ||
rm -rf "${TMP_GOPATH}" | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
OUTPUT_GOBIN="${REPO_ROOT}/_output/bin" | ||
GOBIN="${OUTPUT_GOBIN}" go install ./vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle | ||
GOBIN="${OUTPUT_GOBIN}" go install ./vendor/github.com/kubernetes/repo-infra/kazel | ||
|
||
touch "${REPO_ROOT}/vendor/BUILD.bazel" | ||
|
||
"${OUTPUT_GOBIN}/gazelle" fix \ | ||
-external=vendored \ | ||
-mode=fix | ||
|
||
"${OUTPUT_GOBIN}/kazel" \ | ||
-cfg-path="${REPO_ROOT}/hack/.kazelcfg.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
# Copyright 2018 The Kubernetes Authors. | ||
# | ||
# 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. | ||
|
||
|
||
# Run dep ensure and generate bazel rules. | ||
# | ||
# Usage: | ||
# update-deps.sh <ARGS> | ||
# | ||
# The args are sent to dep ensure -v <ARGS> | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
trap 'echo "FAILED" >&2' ERR | ||
|
||
# TODO(bentheelder): support first-class using a bazel-built dep instead | ||
DEP="dep" | ||
|
||
cd "${REPO_ROOT}" | ||
|
||
|
||
# dep itself has a problematic testdata directory with infinite symlinks which | ||
# makes bazel sad: https://github.com/golang/dep/pull/1412 | ||
# dep should probably be removing it, but it doesn't: | ||
# https://github.com/golang/dep/issues/1580 | ||
rm -rf vendor/github.com/golang/dep/internal/fs/testdata | ||
# go-bindata does too, and is not maintained ... | ||
rm -rf vendor/github.com/jteeuwen/go-bindata/testdata | ||
# docker has a contrib dir with nothing we use in it, dep will retain the licenses | ||
# which includes some GPL, so we manually prune this. | ||
# See https://github.com/kubernetes/steering/issues/57 | ||
rm -rf vendor/github.com/docker/docker/contrib | ||
"${DEP}" ensure -v "$@" | ||
rm -rf vendor/github.com/golang/dep/internal/fs/testdata | ||
rm -rf vendor/github.com/jteeuwen/go-bindata/testdata | ||
rm -rf vendor/github.com/docker/docker/contrib | ||
hack/update-bazel.sh | ||
echo SUCCESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters