forked from istio/envoy
-
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.
ci: use azp for api and go-control-plane sync (envoyproxy#13550)
Signed-off-by: Lizan Zhou <[email protected]>
- Loading branch information
Showing
8 changed files
with
77 additions
and
65 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,15 @@ | |
set -e | ||
|
||
CHECKOUT_DIR=../data-plane-api | ||
MAIN_BRANCH="refs/heads/master" | ||
API_MAIN_BRANCH="master" | ||
|
||
if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" == "master" ] | ||
then | ||
if [[ "${AZP_BRANCH}" == "${MAIN_BRANCH}" ]]; then | ||
echo "Cloning..." | ||
git clone [email protected]:envoyproxy/data-plane-api "$CHECKOUT_DIR" | ||
git clone [email protected]:envoyproxy/data-plane-api "$CHECKOUT_DIR" -b "${API_MAIN_BRANCH}" | ||
|
||
git -C "$CHECKOUT_DIR" config user.name "data-plane-api(CircleCI)" | ||
git -C "$CHECKOUT_DIR" config user.name "data-plane-api(Azure Pipelines)" | ||
git -C "$CHECKOUT_DIR" config user.email [email protected] | ||
git -C "$CHECKOUT_DIR" fetch | ||
git -C "$CHECKOUT_DIR" checkout -B master origin/master | ||
|
||
# Determine last envoyproxy/envoy SHA in envoyproxy/data-plane-api | ||
MIRROR_MSG="Mirrored from https://github.com/envoyproxy/envoy" | ||
|
@@ -40,6 +39,6 @@ then | |
done | ||
|
||
echo "Pushing..." | ||
git -C "$CHECKOUT_DIR" push origin master | ||
git -C "$CHECKOUT_DIR" push origin "${API_MAIN_BRANCH}" | ||
echo "Done" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,21 @@ | |
from subprocess import check_call | ||
import glob | ||
import os | ||
import shlex | ||
import shutil | ||
import sys | ||
import re | ||
|
||
# Needed for CI to pass down bazel options. | ||
BAZEL_BUILD_OPTIONS = shlex.split(os.environ.get('BAZEL_BUILD_OPTIONS', '')) | ||
|
||
TARGETS = '@envoy_api//...' | ||
IMPORT_BASE = 'github.com/envoyproxy/go-control-plane' | ||
OUTPUT_BASE = 'build_go' | ||
REPO_BASE = 'go-control-plane' | ||
BRANCH = 'master' | ||
MIRROR_MSG = 'Mirrored from envoyproxy/envoy @ ' | ||
USER_NAME = 'go-control-plane(CircleCI)' | ||
USER_NAME = 'go-control-plane(Azure Pipelines)' | ||
USER_EMAIL = '[email protected]' | ||
|
||
|
||
|
@@ -32,7 +36,7 @@ def generateProtobufs(output): | |
check_call([ | ||
'bazel', 'build', '-c', 'fastbuild', | ||
'--experimental_proto_descriptor_sets_include_source_info' | ||
] + go_protos) | ||
] + BAZEL_BUILD_OPTIONS + go_protos) | ||
|
||
for rule in go_protos: | ||
# Example rule: | ||
|
@@ -67,9 +71,7 @@ def git(repo, *args): | |
|
||
def cloneGoProtobufs(repo): | ||
# Create a local clone of go-control-plane | ||
git(None, 'clone', '[email protected]:envoyproxy/go-control-plane', repo) | ||
git(repo, 'fetch') | ||
git(repo, 'checkout', '-B', BRANCH, 'origin/master') | ||
git(None, 'clone', '[email protected]:envoyproxy/go-control-plane', repo, '-b', BRANCH) | ||
|
||
|
||
def findLastSyncSHA(repo): | ||
|
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