-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* generate go code from protos * bazel * check gencode without git * dont get workspace status when checking gen go * SOURCE_VERSION is a file not an env-var
- Loading branch information
Showing
41 changed files
with
15,973 additions
and
398 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
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
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
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 was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
api/envoy/config/filter/network/consul_connect/v2/authorize.proto
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
api/envoy/config/filter/network/consul_connect/v2/consul_connect.proto
This file was deleted.
Oops, something went wrong.
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
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,52 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
# copied from bazel_envoy_api_go_build in envoy's do_ci.sh | ||
|
||
# TODO: if we ever have protos using other protos from our repos, we'll need to fix this to not be envoyproxy | ||
GO_IMPORT_BASE="github.com/envoyproxy/go-control-plane/api/envoy" | ||
GO_TARGETS=(//api/envoy/...) | ||
read -r -a GO_PROTOS <<< "$(bazel query "${BAZEL_GLOBAL_OPTIONS[@]}" "kind('go_proto_library', ${GO_TARGETS[*]})" | tr '\n' ' ')" | ||
bazel build "${BAZEL_BUILD_OPTIONS[@]}" \ | ||
--experimental_proto_descriptor_sets_include_source_info \ | ||
--remote_download_outputs=all \ | ||
"${GO_PROTOS[@]}" | ||
rm -rf build_go | ||
mkdir -p build_go | ||
echo "Copying go protos -> build_go" | ||
BAZEL_BIN="$(bazel info "${BAZEL_BUILD_OPTIONS[@]}" bazel-bin)" | ||
for GO_PROTO in "${GO_PROTOS[@]}"; do | ||
# strip @envoy_api// | ||
RULE_DIR="$(echo "${GO_PROTO:12}" | cut -d: -f1)" | ||
PROTO="$(echo "${GO_PROTO:12}" | cut -d: -f2)" | ||
INPUT_DIR="${BAZEL_BIN}/api/envoy/${RULE_DIR}/${PROTO}_/${GO_IMPORT_BASE}/${RULE_DIR}" | ||
OUTPUT_DIR="build_go/${RULE_DIR}" | ||
mkdir -p "$OUTPUT_DIR" | ||
if [[ ! -e "$INPUT_DIR" ]]; then | ||
echo "Unable to find input ${INPUT_DIR}" >&2 | ||
exit 1 | ||
fi | ||
# echo "Copying go files ${INPUT_DIR} -> ${OUTPUT_DIR}" | ||
while read -r GO_FILE; do | ||
if [[ "$GO_FILE" = *.validate.go ]]; then | ||
sed -i '1s;^;//go:build !disable_pgv\n;' "$GO_FILE" | ||
fi | ||
|
||
# if check is not empty, then we will check diff; otherwise we will just copy | ||
if [ -n "$CHECK" ]; then | ||
diff "$GO_FILE" "go/${RULE_DIR}/$(basename "$GO_FILE")" | ||
else | ||
cp -a "$GO_FILE" "$OUTPUT_DIR" | ||
fi | ||
done <<< "$(find "$INPUT_DIR" -name "*.go")" | ||
done | ||
|
||
# remove all folders from the `go` folder | ||
if [ -z "$CHECK" ]; then | ||
rm -rf ./go/config | ||
rm -rf ./go/type | ||
cp -r build_go/* ./go | ||
fi | ||
|
||
rm -rf build_go |
This file was deleted.
Oops, something went wrong.
Empty file.
47 changes: 0 additions & 47 deletions
47
e2e/extensions/filters/network/consul_connect/authorize_endpoint.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.