Skip to content

Commit 9c3e362

Browse files
committed
try: prints logs on failure
1 parent 2e79788 commit 9c3e362

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/operator_bundle_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
operatorhub-test:
77
runs-on: ubuntu-latest
88
env:
9-
OP_TEST_CONTAINER_OPT: "-i"
9+
OP_TEST_CONTAINER_OPT: " "
1010
steps:
1111
- name: Set up Go env
1212
uses: actions/setup-go@v2
@@ -30,3 +30,7 @@ jobs:
3030
cd go/src/github.com/${{ env.REPOSITORY }}
3131
make lint-prepare bundle-test
3232
shell: bash
33+
- name: Print test logs if failure
34+
if: ${{ failure() }}
35+
run: |
36+
cat /tmp/op-test/log.out

scripts/release/operatorhub.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ if [[ $runTests -ne 0 ]]; then
9898
bash <(curl -sL https://cutt.ly/AEeucaw) \
9999
"$tests" \
100100
"${OPERATOR_HUB}/${OPERATOR_NAME}/${OPERATOR_VERSION}"
101-
echo $?
101+
## Until the script is fixed https://github.com/redhat-openshift-ecosystem/operator-test-playbooks/pull/247
102+
tail -n 4 /tmp/op-test/log.out | grep "Failed with rc="
103+
exit_code=$?
104+
if [ $exit_code -eq 0 ]; then exit $exit_code; fi # "Failed with rc=" was found in the logs
102105
fi
103106

104107
if [[ ! $dryRun && -z $GITHUB_TOKEN ]]; then

0 commit comments

Comments
 (0)