Skip to content

Commit b4fd721

Browse files
chore: added extra variables owlbot kokoro configs (#822)
1 parent 9a4049c commit b4fd721

File tree

7 files changed

+143
-0
lines changed

7 files changed

+143
-0
lines changed

.kokoro/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,23 @@ env_vars: {
1111
key: "TRAMPOLINE_BUILD_FILE"
1212
value: "github/java-logging-logback/.kokoro/build.sh"
1313
}
14+
15+
16+
#############################################
17+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
18+
19+
env_vars: {
20+
key: "PRODUCT_AREA_LABEL"
21+
value: "observability"
22+
}
23+
env_vars: {
24+
key: "PRODUCT_LABEL"
25+
value: "logging"
26+
}
27+
env_vars: {
28+
key: "LANGUAGE_LABEL"
29+
value: "java"
30+
}
31+
32+
###################################################
33+

.kokoro/common_env_vars.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#############################################
3+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
4+
5+
env_vars: {
6+
key: "PRODUCT_AREA_LABEL"
7+
value: "observability"
8+
}
9+
env_vars: {
10+
key: "PRODUCT_LABEL"
11+
value: "logging"
12+
}
13+
env_vars: {
14+
key: "LANGUAGE_LABEL"
15+
value: "java"
16+
}
17+
18+
###################################################
19+

.kokoro/continuous/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,23 @@ env_vars: {
2323
key: "JOB_TYPE"
2424
value: "test"
2525
}
26+
27+
28+
#############################################
29+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
30+
31+
env_vars: {
32+
key: "PRODUCT_AREA_LABEL"
33+
value: "observability"
34+
}
35+
env_vars: {
36+
key: "PRODUCT_LABEL"
37+
value: "logging"
38+
}
39+
env_vars: {
40+
key: "LANGUAGE_LABEL"
41+
value: "java"
42+
}
43+
44+
###################################################
45+

.kokoro/nightly/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,23 @@ env_vars: {
2323
key: "JOB_TYPE"
2424
value: "test"
2525
}
26+
27+
28+
#############################################
29+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
30+
31+
env_vars: {
32+
key: "PRODUCT_AREA_LABEL"
33+
value: "observability"
34+
}
35+
env_vars: {
36+
key: "PRODUCT_LABEL"
37+
value: "logging"
38+
}
39+
env_vars: {
40+
key: "LANGUAGE_LABEL"
41+
value: "java"
42+
}
43+
44+
###################################################
45+

.kokoro/presubmit/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,23 @@ before_action {
3232
}
3333
}
3434
}
35+
36+
37+
#############################################
38+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
39+
40+
env_vars: {
41+
key: "PRODUCT_AREA_LABEL"
42+
value: "observability"
43+
}
44+
env_vars: {
45+
key: "PRODUCT_LABEL"
46+
value: "logging"
47+
}
48+
env_vars: {
49+
key: "LANGUAGE_LABEL"
50+
value: "java"
51+
}
52+
53+
###################################################
54+

.kokoro/release/common.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,23 @@ before_action {
4747
}
4848
}
4949
}
50+
51+
52+
#############################################
53+
# this section merged from .kokoro/common_env_vars.cfg using owlbot.py
54+
55+
env_vars: {
56+
key: "PRODUCT_AREA_LABEL"
57+
value: "observability"
58+
}
59+
env_vars: {
60+
key: "PRODUCT_LABEL"
61+
value: "logging"
62+
}
63+
env_vars: {
64+
key: "LANGUAGE_LABEL"
65+
value: "java"
66+
}
67+
68+
###################################################
69+

owlbot.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
"""This script is used to synthesize generated parts of this library."""
1616

17+
import os
1718
import synthtool.languages.java as java
19+
import synthtool as s
1820

1921
java.common_templates(excludes=[
2022
'.gitignore',
@@ -23,3 +25,25 @@
2325
'CONTRIBUTING.md',
2426
'.github/auto-label.yaml',
2527
])
28+
29+
# --------------------------------------------------------------------------
30+
# Modify test configs
31+
# --------------------------------------------------------------------------
32+
33+
# add shared environment variables to test configs
34+
s.move(
35+
".kokoro/common_env_vars.cfg",
36+
".kokoro/common.cfg",
37+
merge=lambda src, dst, _, : f"{dst}\n{src}",
38+
)
39+
tracked_subdirs = ["continuous", "presubmit", "release", "nightly"]
40+
for subdir in tracked_subdirs:
41+
for path, subdirs, files in os.walk(f".kokoro/{subdir}"):
42+
for name in files:
43+
if name == "common.cfg":
44+
file_path = os.path.join(path, name)
45+
s.move(
46+
".kokoro/common_env_vars.cfg",
47+
file_path,
48+
merge=lambda src, dst, _, : f"{dst}\n{src}",
49+
)

0 commit comments

Comments
 (0)