Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 2b9064f

Browse files
chore: added extra variables owlbot kokoro configs (#917)
1 parent 1e8d996 commit 2b9064f

File tree

7 files changed

+142
-0
lines changed

7 files changed

+142
-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-errorreporting/.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: "error-reporting"
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: "error-reporting"
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: "error-reporting"
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: "error-reporting"
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: "error-reporting"
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: "error-reporting"
62+
}
63+
env_vars: {
64+
key: "LANGUAGE_LABEL"
65+
value: "java"
66+
}
67+
68+
###################################################
69+

owlbot.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import os
1516
import synthtool as s
1617
from synthtool.languages import java
1718

@@ -75,3 +76,25 @@
7576

7677
s.remove_staging_dirs()
7778
java.common_templates(excludes=['.github/auto-label.yaml'])
79+
80+
# --------------------------------------------------------------------------
81+
# Modify test configs
82+
# --------------------------------------------------------------------------
83+
84+
# add shared environment variables to test configs
85+
s.move(
86+
".kokoro/common_env_vars.cfg",
87+
".kokoro/common.cfg",
88+
merge=lambda src, dst, _, : f"{dst}\n{src}",
89+
)
90+
tracked_subdirs = ["continuous", "presubmit", "release", "nightly"]
91+
for subdir in tracked_subdirs:
92+
for path, subdirs, files in os.walk(f".kokoro/{subdir}"):
93+
for name in files:
94+
if name == "common.cfg":
95+
file_path = os.path.join(path, name)
96+
s.move(
97+
".kokoro/common_env_vars.cfg",
98+
file_path,
99+
merge=lambda src, dst, _, : f"{dst}\n{src}",
100+
)

0 commit comments

Comments
 (0)