Skip to content
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
38 changes: 35 additions & 3 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ trigger:
# PR build config is manually overridden in Azure pipelines UI with different secrets
pr: none

variables:
- name: isDev
# This must be checked/set in a `step` from the VERSION.txt file, in order to be useful
value: true
- name: isMain
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
- name: isRelease
value: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/release/v')]
- name: isStableBranch
# A release branch can be either `main` or a `release/v1.x` stable branch
value: $[or(eq(variables['isMain'], 'true'), eq(variables['isRelease'], 'true'))]

stages:
- stage: precheck
jobs:
Expand Down Expand Up @@ -425,11 +437,11 @@ stages:
timeoutInMinutes: 10
condition: always()

- stage: docs
- stage: publish
dependsOn: ["docker"]
condition: and(succeeded(), eq(variables['PostSubmit'], true), ne(variables['NoSync'], true))
jobs:
- job: publish
- job: docs
pool:
vmImage: "ubuntu-20.04"
steps:
Expand Down Expand Up @@ -458,7 +470,7 @@ stages:
ENVOY_DOCKER_BUILD_DIR: $(Build.StagingDirectory)
GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)
GCS_ARTIFACT_BUCKET: $(GcsArtifactBucket)
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
condition: eq(variables['isMain'], 'true')

- task: InstallSSHKey@0
inputs:
Expand All @@ -474,6 +486,26 @@ stages:
AZP_BRANCH: $(Build.SourceBranch)
NETLIFY_TRIGGER_URL: $(NetlifyTriggerURL)

- job: github
dependsOn: ["docs"]
condition: eq(variables['isStableBranch'], 'true')
pool:
vmImage: "ubuntu-20.04"
steps:
- bash: |
VERSION_DEV="$(cat VERSION.txt | cut -d- -f2)"
if [[ $VERSION_DEV != "dev" ]]; then
echo "##vso[task.setvariable variable=isDev]false"
fi
displayName: Set development/release env

- script: ./ci/run_envoy_docker.sh './ci/do_ci.sh publish'
displayName: "Publish release to Github"
workingDirectory: $(Build.SourcesDirectory)
condition: eq(variables['isDev'], 'false')
env:
GITHUB_TOKEN: $(GitHubPublicRepoOnlyAccessToken)

- stage: verify
dependsOn: ["docker"]
jobs:
Expand Down
5 changes: 4 additions & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
build_setup_args=""
if [[ "$1" == "format" || "$1" == "fix_proto_format" || "$1" == "check_proto_format" || "$1" == "docs" || \
"$1" == "bazel.clang_tidy" || "$1" == "bazel.distribution" \
|| "$1" == "deps" || "$1" == "verify_examples" \
|| "$1" == "deps" || "$1" == "verify_examples" || "$1" == "publish" \
|| "$1" == "verify_distro" ]]; then
build_setup_args="-nofetch"
fi
Expand Down Expand Up @@ -520,6 +520,9 @@ elif [[ "$CI_TARGET" == "verify_distro" ]]; then
fi
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //distribution:verify_packages "$PACKAGE_BUILD"
exit 0
elif [[ "$CI_TARGET" == "publish" ]]; then
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/project:publish
exit 0
else
echo "Invalid do_ci.sh target, see ci/README.md for valid targets."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion tools/base/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ aiohttp>=3.8.1
cffi>=1.15.0
colorama
coloredlogs
envoy.base.utils>=0.3.6
envoy.base.utils>=0.3.7
envoy.code.check>=0.2.1
envoy.dependency.check>=0.1.5
envoy.dependency.pip_check>=0.1.2
Expand Down
12 changes: 6 additions & 6 deletions tools/base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ aio-api-bazel==0.0.2 \
--hash=sha256:56e36463d236e477b7e282f2d870185a0b978b50e2c3803c1ebf8b8ac4b18f5b \
--hash=sha256:d3f563b7698e874437d80538a89dd4d79bc37de2e850c846330ae456e3f21dcc
# via -r requirements.in
aio-api-github==0.1.2 \
--hash=sha256:0c9eabf16e60dddd3879c27337f7c31e5582c9144a5aef268941dd08b0ddf342 \
--hash=sha256:144808e4832dfd6895ed1887bd96d9f4d289761ec03ecbeb589434bcce686b33
aio-api-github==0.1.4 \
--hash=sha256:0a09e476ca4eea3d8a0caa861223f170b4a7f4c1b96976574b8d2a282544d353 \
--hash=sha256:9796778d6b7993e7a3b0ba68af46a314091dcbae2ab98e8f42e3dd5631ed7ab3
# via
# envoy-base-utils
# envoy-dependency-check
Expand Down Expand Up @@ -309,9 +309,9 @@ docutils==0.16 \
# sphinx
# sphinx-rtd-theme
# sphinx-tabs
envoy-base-utils==0.3.6 \
--hash=sha256:09bab1310ffd133250e484201244eb11ab019ac36362b14f913ce91ecb023cb3 \
--hash=sha256:ad699b94fd7c63088266a5cbc74ff732e653e586b5c1b9002351080c7d850c09
envoy-base-utils==0.3.7 \
--hash=sha256:5c79aa70de6b7014a5b955822eb83324fd222b7cf7bb656e12a018c747b4f2df \
--hash=sha256:ac7850ec1c90253964a5d7f7847a3c3317f9d77607e6f90d1fb5aeb975ac2842
# via
# -r requirements.in
# envoy-code-check
Expand Down
10 changes: 10 additions & 0 deletions tools/project/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ envoy_entry_point(
pkg = "envoy.base.utils",
script = "envoy.project",
)

envoy_entry_point(
name = "publish",
args = [
"publish",
PATH,
],
pkg = "envoy.base.utils",
script = "envoy.project",
)