Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version of build tools #1685

Merged
merged 2 commits into from
Jul 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tools/cmd/wcloud/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@ type Config struct {
RepoPath string `json:"repo_path" yaml:"repo_path"`
RepoKey string `json:"repo_key" yaml:"repo_key"`
KubeconfigPath string `json:"kubeconfig_path" yaml:"kubeconfig_path"`

Notifications []NotificationConfig `json:"notifications" yaml:"notifications"`

// Globs of files not to change, relative to the route of the repo
ConfigFileBlackList []string `json:"config_file_black_list" yaml:"config_file_black_list"`
}

// NotificationConfig describes how to send notifications
type NotificationConfig struct {
SlackWebhookURL string `json:"slack_webhook_url" yaml:"slack_webhook_url"`
SlackUsername string `json:"slack_username" yaml:"slack_username"`
}
4 changes: 1 addition & 3 deletions tools/files-with-type
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#
# e.g.
# $ files-with-type text/x-shellscript k8s infra
#
# Assumes `find`, `xargs`, and `file` are all installed.

mime_type=$1
shift

find "$@" -print0 -type f |xargs -0 file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//'
git ls-files "$@" | grep -vE '^vendor/' | xargs file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//'
2 changes: 1 addition & 1 deletion tools/lint
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function lint_files {

function list_files {
if [ $# -gt 0 ]; then
find "$@" -type f | grep -vE '(^\./\.git|^\./\.pkg|/vendor/|/node_modules/|\.codecgen\.go$|\.generated\.go$)'
git ls-files --exclude-standard | grep -vE '(^|/)vendor/'
else
git diff --cached --name-only
fi
Expand Down
5 changes: 3 additions & 2 deletions tools/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -ex
set -e

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GO_TEST_ARGS=( -tags netgo -cpu 4 -timeout 8m )
Expand Down Expand Up @@ -47,7 +47,8 @@ fi

fail=0

TESTDIRS=( $(find . -type f -name '*_test.go' -print0 | xargs -0 -n1 dirname | grep -vE '^\./(\.git|vendor|prog|experimental)/' | sort -u) )
# NB: Relies on paths being prefixed with './'.
TESTDIRS=( $(git ls-files -- '*_test.go' | grep -vE '^(vendor|prog|experimental)/' | xargs -n1 dirname | sort -u | sed -e 's|^|./|') )

# If running on circle, use the scheduler to work out what tests to run on what shard
if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ] && [ -x "$DIR/sched" ]; then
Expand Down