@@ -41,17 +41,41 @@ jobs:
4141 INPUT_EVENTJSON : ${{ toJson(github.event) }}
4242 INPUT_SENDERUSERNAME : GitHubZ
4343 INPUT_SENDERICONURL : https://github.com/fluidicon.png
44- ZITI_LOG : 6
45- TLSUV_DEBUG : 6
44+ INPUT_ZITILOGLEVEL : 6
4645 shell : bash
4746 run : |
4847 set -o pipefail
4948 set -o xtrace
5049 pip install --user --upgrade --requirement ./requirements.txt
51- sudo sysctl -w kernel.core_pattern='/tmp/core.%e.%p.%t'
50+ sudo mkdir -m0777 ${{ github.workspace }}/cores
51+ sudo sysctl -w kernel.core_pattern='${{ github.workspace }}/cores/core.%e.%p.%t'
5252 ulimit -c unlimited
5353 valgrind --verbose --log-file=/tmp/zook.py-valgrind-%p-%n.log --leak-check=full python ./zhook.py
5454
55+ - name : Run as Docker Action with Core Dumps
56+ if : |
57+ github.repository_owner == 'openziti'
58+ && ((github.event_name != 'pull_request_review')
59+ || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
60+ shell : bash
61+ run : |
62+ set -o pipefail
63+ set -o xtrace
64+ docker build -t zhook-action .
65+ docker run --rm \
66+ -v "${{ github.workspace }}:${{ github.workspace }}" \
67+ -w "${{ github.workspace }}" \
68+ -e INPUT_ZITIID="${{ secrets.ZITI_MATTERMOST_IDENTITY }}" \
69+ -e INPUT_WEBHOOKURL="${{ secrets.ZHOOK_URL_DEV_NOTIFICATIONS }}" \
70+ -e INPUT_EVENTJSON='${{ toJson(github.event) }}' \
71+ -e INPUT_SENDERUSERNAME="GitHubZ" \
72+ -e INPUT_ZITILOGLEVEL="6" \
73+ --entrypoint /bin/sh \
74+ zhook-action -xc "
75+ ulimit -c unlimited
76+ exec /app/zhook.py
77+ "
78+
5579 - uses : ./
5680 name : Run as a GH Action from the Local Checkout
5781 if : |
6387 webhookUrl : ${{ secrets.ZHOOK_URL_DEV_NOTIFICATIONS }}
6488 eventJson : ${{ toJson(github.event) }}
6589 senderUsername : GitHubZ
90+ zitiLogLevel : 6
6691
6792 - name : Print Debug Info
6893 if : always()
@@ -75,7 +100,10 @@ jobs:
75100 echo "DEBUG: LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}"
76101 find $(python -c "import site; print(site.USER_SITE)") -path "*/openziti*" -name "*.so*" -type f -print0 | xargs -0r ldd
77102 cat /tmp/zook.py-valgrind-*.log
78- if [ -s /tmp/core.python.* ]; then
79- echo "DEBUG: Core dump found"
80- gdb -q $(realpath $(which python)) -c /tmp/core.python.* --ex bt --ex exit
81- fi
103+ for CORE in ${{ github.workspace }}/cores/core.*; do
104+ if [ -s "$CORE" ]; then
105+ echo "DEBUG: Core dump found: $CORE"
106+ EXECUTABLE=$(basename "$CORE" | cut -d. -f2)
107+ gdb -q $(realpath $(which "$EXECUTABLE")) -c "$CORE" --ex bt --ex exit
108+ fi
109+ done
0 commit comments