Skip to content

Commit

Permalink
chore: added extra variables owlbot kokoro configs (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche authored Aug 23, 2022
1 parent 663e7e2 commit 95c5edb
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 0 deletions.
20 changes: 20 additions & 0 deletions java-errorreporting/.kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,23 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-errorreporting/.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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

19 changes: 19 additions & 0 deletions java-errorreporting/.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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

20 changes: 20 additions & 0 deletions java-errorreporting/.kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@ env_vars: {
key: "JOB_TYPE"
value: "test"
}


#############################################
# 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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

20 changes: 20 additions & 0 deletions java-errorreporting/.kokoro/nightly/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@ env_vars: {
key: "JOB_TYPE"
value: "test"
}


#############################################
# 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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

20 changes: 20 additions & 0 deletions java-errorreporting/.kokoro/presubmit/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,23 @@ before_action {
}
}
}


#############################################
# 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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

20 changes: 20 additions & 0 deletions java-errorreporting/.kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,23 @@ before_action {
}
}
}


#############################################
# 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: "error-reporting"
}
env_vars: {
key: "LANGUAGE_LABEL"
value: "java"
}

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

23 changes: 23 additions & 0 deletions java-errorreporting/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import synthtool as s
from synthtool.languages import java

Expand Down Expand Up @@ -75,3 +76,25 @@

s.remove_staging_dirs()
java.common_templates(excludes=['.github/auto-label.yaml'])

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

# add shared environment variables to test configs
s.move(
".kokoro/common_env_vars.cfg",
".kokoro/common.cfg",
merge=lambda src, dst, _, : f"{dst}\n{src}",
)
tracked_subdirs = ["continuous", "presubmit", "release", "nightly"]
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 95c5edb

Please sign in to comment.