-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffd818f
commit 3837986
Showing
6 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Runs the given command. | ||
# If a redis cache is available and we're not in a terminal, duplicate output into a cache log. | ||
NO_CD=1 source $(git rev-parse --show-toplevel)/ci3/source | ||
|
||
if [ -n "$CI_REDIS" ] && [ ! -t 1 ]; then | ||
key=${LOG_ID:-$(uuid)} | ||
echo -e "Log id: ${yellow}$key${reset}" | ||
tee >(redis-cli -h $CI_REDIS -x SETEX $key 604800 &>/dev/null) | ||
echo -e "Log id: ${yellow}$key${reset}" | ||
else | ||
cat | ||
fi | ||
|
||
# NO_CD=1 source $(git rev-parse --show-toplevel)/ci3/source | ||
|
||
# if [ -n "$CI_REDIS" ] && [ ! -t 1 ]; then | ||
# key=$(uuid) | ||
# echo -e "Executing: $1 (${yellow}$key${reset})" | ||
# bash -c "$1" | tee >(redis-cli -h $CI_REDIS -x SETEX $key 604800 &>/dev/null) | ||
# echo -e "Complete: $1 (${yellow}$key${reset})" | ||
# else | ||
# exec bash -c "$1" | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters