tools/kochdocs: add log folding supports for more CI services (#14643)
Added log folding for: - Github Actions - Azure Pipelines
This commit is contained in:
parent
c83a22b76e
commit
67d34366dc
1 changed files with 9 additions and 1 deletions
|
|
@ -49,14 +49,22 @@ proc exec*(cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
|
||||||
template inFold*(desc, body) =
|
template inFold*(desc, body) =
|
||||||
if existsEnv("TRAVIS"):
|
if existsEnv("TRAVIS"):
|
||||||
echo "travis_fold:start:" & desc.replace(" ", "_")
|
echo "travis_fold:start:" & desc.replace(" ", "_")
|
||||||
|
elif existsEnv("GITHUB_ACTIONS"):
|
||||||
|
echo "::group::" & desc
|
||||||
|
elif existsEnv("TF_BUILD"):
|
||||||
|
echo "##[group]" & desc
|
||||||
|
|
||||||
body
|
body
|
||||||
|
|
||||||
if existsEnv("TRAVIS"):
|
if existsEnv("TRAVIS"):
|
||||||
echo "travis_fold:end:" & desc.replace(" ", "_")
|
echo "travis_fold:end:" & desc.replace(" ", "_")
|
||||||
|
elif existsEnv("GITHUB_ACTIONS"):
|
||||||
|
echo "::endgroup::"
|
||||||
|
elif existsEnv("TF_BUILD"):
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
|
proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
|
||||||
## Execute shell command. Add log folding on Travis CI.
|
## Execute shell command. Add log folding for various CI services.
|
||||||
# https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
|
# https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
|
||||||
inFold(desc):
|
inFold(desc):
|
||||||
exec(cmd, errorcode, additionalPath)
|
exec(cmd, errorcode, additionalPath)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue