forked from envoyproxy/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.
Merge remote-tracking branch 'upstream/main' into issue/10076
Signed-off-by: Christoph Pakulski <paker8848@gmail.com>
- Loading branch information
Showing
211 changed files
with
4,111 additions
and
2,054 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash -e | ||
|
||
PUBLISH_GITHUB_RELEASE=$RUN_PACKAGING | ||
PUBLISH_DOCKERHUB=false | ||
|
||
if [[ "$ISSTABLEBRANCH" == True && -n "$POSTSUBMIT" && "$NOSYNC" != true ]]; then | ||
# main | ||
if [[ "$ISMAIN" == True ]]; then | ||
# Update the Dockerhub README | ||
PUBLISH_DOCKERHUB=true | ||
# Not main, and not -dev | ||
elif [[ $STATE_ISDEV == false ]]; then | ||
if [[ $STATE_VERSIONPATCH -eq 0 ]]; then | ||
# A just-forked branch | ||
PUBLISH_GITHUB_RELEASE=false | ||
fi | ||
fi | ||
fi | ||
|
||
# Only run Envoy release CI if explictly set | ||
if { [[ "$PRESUBMIT" != 'true' ]] && [[ "$POSTSUBMIT" != 'true' ]]; } || [[ $BUILD_REASON == "Schedule" ]]; then | ||
PUBLISH_GITHUB_RELEASE=false | ||
fi | ||
|
||
echo "##vso[task.setvariable variable=githubRelease;isoutput=true]${PUBLISH_GITHUB_RELEASE}" | ||
echo "##vso[task.setvariable variable=dockerhub;isoutput=true]${PUBLISH_DOCKERHUB}" |
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,36 @@ | ||
#!/bin/bash -e | ||
|
||
RUN_BUILD=true | ||
RUN_CHECKS=true | ||
RUN_DOCKER=true | ||
RUN_PACKAGING=true | ||
RUN_RELEASE_TESTS=true | ||
|
||
if [[ $CHANGED_MOBILEONLY == true || $CHANGED_DOCSONLY == true ]]; then | ||
RUN_BUILD=false | ||
RUN_CHECKS=false | ||
RUN_DOCKER=false | ||
RUN_PACKAGING=false | ||
fi | ||
if [[ $CHANGED_EXAMPLESONLY == true ]]; then | ||
RUN_CHECKS=false | ||
fi | ||
if [[ "$ISSTABLEBRANCH" == True && -n "$POSTSUBMIT" && $STATE_ISDEV == false ]]; then | ||
RUN_RELEASE_TESTS=false | ||
fi | ||
|
||
# Run ~everything in postsubmit | ||
if [[ $BUILD_REASON != "PullRequest" ]]; then | ||
echo "##vso[task.setvariable variable=build;isoutput=true]true" | ||
echo "##vso[task.setvariable variable=checks;isoutput=true]true" | ||
echo "##vso[task.setvariable variable=docker;isoutput=true]true" | ||
echo "##vso[task.setvariable variable=packaging;isoutput=true]true" | ||
echo "##vso[task.setvariable variable=releaseTests;isoutput=true]${RUN_RELEASE_TESTS}" | ||
exit 0 | ||
fi | ||
|
||
echo "##vso[task.setvariable variable=build;isoutput=true]${RUN_BUILD}" | ||
echo "##vso[task.setvariable variable=checks;isoutput=true]${RUN_CHECKS}" | ||
echo "##vso[task.setvariable variable=docker;isoutput=true]${RUN_DOCKER}" | ||
echo "##vso[task.setvariable variable=packaging;isoutput=true]${RUN_PACKAGING}" | ||
echo "##vso[task.setvariable variable=releaseTests;isoutput=true]${RUN_RELEASE_TESTS}" |
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,37 @@ | ||
#!/bin/bash -e | ||
|
||
# Only exclude checks in pull requests. | ||
if [[ $BUILD_REASON != "PullRequest" ]]; then | ||
echo "##vso[task.setvariable variable=mobileOnly;isoutput=true]false" | ||
echo "##vso[task.setvariable variable=docsOnly;isoutput=true]false" | ||
echo "##vso[task.setvariable variable=examplesOnly;isoutput=true]false" | ||
echo "##vso[task.setvariable variable=requirements;isoutput=true]true" | ||
exit 0 | ||
fi | ||
|
||
CHANGE_TARGET="origin/$TARGET_BRANCH" | ||
|
||
echo "Comparing changes ${CHANGE_TARGET}...HEAD" | ||
CHANGED_PATHS=$(git diff --name-only "${CHANGE_TARGET}"...HEAD | cut -d/ -f1 | sort -u | jq -sR 'rtrimstr("\n") | split("\n")') | ||
echo "$CHANGED_PATHS" | jq '.' | ||
CHANGED_PATH_COUNT=$(echo "$CHANGED_PATHS" | jq '. | length') | ||
CHANGED_MOBILE_ONLY=false | ||
CHANGED_DOCS_ONLY=false | ||
CHANGED_EXAMPLES_ONLY=false | ||
|
||
CHANGED_MOBILE=$(echo "$CHANGED_PATHS" | jq '. as $A | "mobile" | IN($A[])') | ||
if [[ $CHANGED_MOBILE == true && $CHANGED_PATH_COUNT -eq 1 ]]; then | ||
CHANGED_MOBILE_ONLY=true | ||
fi | ||
CHANGED_DOCS=$(echo "$CHANGED_PATHS" | jq '. as $A | "docs" | IN($A[])') | ||
if [[ $CHANGED_DOCS == true && $CHANGED_PATH_COUNT -eq 1 ]]; then | ||
CHANGED_DOCS_ONLY=true | ||
fi | ||
CHANGED_EXAMPLES=$(echo "$CHANGED_PATHS" | jq '. as $A | "examples" | IN($A[])') | ||
if [[ $CHANGED_EXAMPLES == true && $CHANGED_PATH_COUNT -eq 1 ]]; then | ||
CHANGED_EXAMPLES_ONLY=true | ||
fi | ||
|
||
echo "##vso[task.setvariable variable=mobileOnly;isoutput=true]${CHANGED_MOBILE_ONLY}" | ||
echo "##vso[task.setvariable variable=docsOnly;isoutput=true]${CHANGED_DOCS_ONLY}" | ||
echo "##vso[task.setvariable variable=examplesOnly;isoutput=true]${CHANGED_EXAMPLES_ONLY}" |
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,22 @@ | ||
#!/bin/bash -e | ||
|
||
VERSION_DEV=$(cut -d- -f2 VERSION.txt) | ||
VERSION_PATCH=$(cut -d- -f1 VERSION.txt | rev | cut -d. -f1 | rev) | ||
echo "##vso[task.setvariable variable=versionPatch;isoutput=true]$VERSION_PATCH" | ||
if [[ $VERSION_DEV == "dev" ]]; then | ||
echo "##vso[task.setvariable variable=isDev;isoutput=true]true" | ||
else | ||
if [[ $BUILD_REASON == "PullRequest" ]]; then | ||
# Check to make sure that it was this PR that changed the version, otherwise fail | ||
# as the branch needs to be reopened first. | ||
# NB: this will not stop a PR that has already passed checks from being landed. | ||
DIFF_TARGET_BRANCH="origin/$TARGET_BRANCH" | ||
DIFF_REF=$(git merge-base HEAD "${DIFF_TARGET_BRANCH}") | ||
CHANGES=$(git diff "$DIFF_REF" HEAD VERSION.txt) | ||
if [[ -z "$CHANGES" ]]; then | ||
echo "VERSION.txt is not a development version. Please re-open the branch before making further changes" >&2 | ||
exit 1 | ||
fi | ||
fi | ||
echo "##vso[task.setvariable variable=isDev;isoutput=true]false" | ||
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
Oops, something went wrong.