Skip to content

Commit

Permalink
Add kokoro config files
Browse files Browse the repository at this point in the history
Signed-off-by: Rafal Kapuscik <rkapuscik@antmicro.com>
  • Loading branch information
Rafal Kapuscik committed Apr 16, 2020
1 parent 4e6ad21 commit a84d38a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/kokoro/continuous-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Format: //devtools/kokoro/config/proto/build.proto
# Generated from .github/kokoro/kokoro-cfg.py
# To regenerate run:
# cd .github/kokoro/ && python3 kokoro-cfg.py
build_file: "UHDM-continuous-test/.github/kokoro/test.sh"
timeout_mins: 4320
env_vars {
key: "KOKORO_TYPE"
value: "continuous"
}
env_vars {
key: "KOKORO_DIR"
value: "UHDM-continuous-test"
}
env_vars {
key: "CI"
value: "test"
}
38 changes: 38 additions & 0 deletions .github/kokoro/kokoro-config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""
Generates kokoro config files based on template.
"""

ci_config = """\
# Format: //devtools/kokoro/config/proto/build.proto
# Generated from .github/kokoro/kokoro-cfg.py
# To regenerate run:
# cd .github/kokoro/ && python3 kokoro-cfg.py
build_file: "UHDM-%(kokoro_type)s-%(ci)s/.github/kokoro/%(ci)s.sh"
timeout_mins: 4320
env_vars {
key: "KOKORO_TYPE"
value: "%(kokoro_type)s"
}
env_vars {
key: "KOKORO_DIR"
value: "UHDM-%(kokoro_type)s-%(ci)s"
}
env_vars {
key: "CI"
value: "%(ci)s"
}
"""

for ci in ['test']:
with open("continuous-%s.cfg" % ci, "w") as f:
f.write(ci_config % {
'ci': ci,
'kokoro_type': 'continuous',
})

with open("presubmit-%s.cfg" % ci, "w") as f:
f.write(ci_config % {
'ci': ci,
'kokoro_type': 'presubmit',
})
18 changes: 18 additions & 0 deletions .github/kokoro/presubmit-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Format: //devtools/kokoro/config/proto/build.proto
# Generated from .github/kokoro/kokoro-cfg.py
# To regenerate run:
# cd .github/kokoro/ && python3 kokoro-cfg.py
build_file: "UHDM-presubmit-test/.github/kokoro/test.sh"
timeout_mins: 4320
env_vars {
key: "KOKORO_TYPE"
value: "presubmit"
}
env_vars {
key: "KOKORO_DIR"
value: "UHDM-presubmit-test"
}
env_vars {
key: "CI"
value: "test"
}

0 comments on commit a84d38a

Please sign in to comment.