Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: added extra variables owlbot kokoro configs (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche authored Aug 12, 2022
1 parent 14f4612 commit 1c7294a
Show file tree
Hide file tree
Showing 11 changed files with 218 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .kokoro/common_env_vars.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

20 changes: 20 additions & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,23 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-monitoring/.kokoro/build.sh"
}


#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/docs/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,23 @@ before_action {
keyname: "docuploader_service_account"
}
}
}
}

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

20 changes: 20 additions & 0 deletions .kokoro/presubmit/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,23 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-monitoring/.kokoro/build.sh"
}


#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

20 changes: 20 additions & 0 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,23 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}


#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/samples/lint/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,23 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/samples/python3.10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,23 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/samples/python3.7/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,23 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/samples/python3.8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,23 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

21 changes: 20 additions & 1 deletion .kokoro/samples/python3.9/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,23 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"
build_file: "python-monitoring/.kokoro/trampoline_v2.sh"

#############################################
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py

env_vars: {
key: "PRODUCT_AREA_LABEL"
value: "observability"
}
env_vars: {
key: "PRODUCT_LABEL"
value: "monitoring"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "python"
}

###################################################

19 changes: 19 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""This script is used to synthesize generated parts of this library."""
import re
import os

import synthtool as s
import synthtool.gcp as gcp
Expand Down Expand Up @@ -149,3 +150,21 @@
python.configure_previous_major_version_branches()

s.shell.run(["nox", "-s", "blacken"], hide_output=False)


# --------------------------------------------------------------------------
# Modify test configs
# --------------------------------------------------------------------------

# add shared environment variables to test configs
tracked_subdirs = ["continuous", "presubmit", "release", "samples", "docs"]
for subdir in tracked_subdirs:
for path, subdirs, files in os.walk(f".kokoro/{subdir}"):
for name in files:
if name == "common.cfg":
file_path = os.path.join(path, name)
s.move(
".kokoro/common_env_vars.cfg",
file_path,
merge=lambda src, dst, _, : f"{dst}\n{src}",
)

0 comments on commit 1c7294a

Please sign in to comment.