forked from caddyserver/caddy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…caddyserver#6594) * caddyhttp: Escaping placeholders in CEL * Simplify some of the test cases * Implement vars and vars_regexp in CEL * dupl lint is dumb * Better consts for the placeholder CEL shortcut * Bump CEL version, register a few extensions * Refactor s390x test script for readability * Add retries for s390x to smooth over flakiness * Switch to `ph` for the CEL shortcut (match it in templates cause why not)
- Loading branch information
1 parent
c8adb1b
commit 792f1c7
Showing
11 changed files
with
276 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,13 +156,35 @@ jobs: | |
# short sha is enough? | ||
short_sha=$(git rev-parse --short HEAD) | ||
# To shorten the following lines | ||
ssh_opts="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" | ||
ssh_host="[email protected]" | ||
# The environment is fresh, so there's no point in keeping accepting and adding the key. | ||
rsync -arz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress --delete --exclude '.git' . "$CI_USER"@ci-s390x.caddyserver.com:/var/tmp/"$short_sha" | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t "$CI_USER"@ci-s390x.caddyserver.com "cd /var/tmp/$short_sha; go version; go env; printf "\n\n";CGO_ENABLED=0 go test -p 1 -tags nobadger -v ./..." | ||
rsync -arz -e "ssh $ssh_opts" --progress --delete --exclude '.git' . "$ssh_host":/var/tmp/"$short_sha" | ||
ssh $ssh_opts -t "$ssh_host" bash <<EOF | ||
cd /var/tmp/$short_sha | ||
go version | ||
go env | ||
printf "\n\n" | ||
retries=3 | ||
exit_code=0 | ||
while ((retries > 0)); do | ||
CGO_ENABLED=0 go test -p 1 -tags nobadger -v ./... | ||
exit_code=$? | ||
if ((exit_code == 0)); then | ||
break | ||
fi | ||
echo "\n\nTest failed: \$exit_code, retrying..." | ||
((retries--)) | ||
done | ||
echo "Remote exit code: \$exit_code" | ||
exit \$exit_code | ||
EOF | ||
test_result=$? | ||
# There's no need leaving the files around | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$CI_USER"@ci-s390x.caddyserver.com "rm -rf /var/tmp/'$short_sha'" | ||
ssh $ssh_opts "$ssh_host" "rm -rf /var/tmp/'$short_sha'" | ||
echo "Test exit code: $test_result" | ||
exit $test_result | ||
|
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
Oops, something went wrong.