Skip to content

Commit 14fa4e9

Browse files
committed
ci debug
1 parent a94f2fe commit 14fa4e9

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

.github/workflows/module_acceptance.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
description: "Disable and stop apparmor"
2727
default: false
2828
type: boolean
29+
ssh-debugging:
30+
description: Boolean; whether or not to pause for ssh debugging
31+
required: true
32+
default: false
2933

3034

3135
# ENABLE PUPPETCORE. The calling workflow must:
@@ -119,7 +123,12 @@ jobs:
119123
sudo systemctl disable apparmor
120124
sudo systemctl stop apparmor
121125
fi
122-
126+
- name: Start SSH session
127+
if: ${{ github.event.inputs.ssh-debugging == 'true' }}
128+
uses: luchihoratiu/debug-via-ssh@main
129+
with:
130+
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
131+
SSH_PASS: ${{ secrets.SSH_PASS }}
123132
- name: "Setup ruby"
124133
uses: "ruby/setup-ruby@v1"
125134
with:
@@ -157,10 +166,29 @@ jobs:
157166
run: |
158167
bundle exec rake 'litmus:install_module'
159168
169+
- name: Wait as long as the file ${HOME}/pause file is present
170+
if: ${{ always() && github.event.inputs.ssh-debugging == true }}
171+
run: |
172+
while [ -f "${HOME}/pause" ] ; do
173+
echo "${HOME}/pause present, sleeping for 60 seconds..."
174+
sleep 60
175+
done
176+
echo "${HOME}/pause absent, continuing workflow."
177+
178+
160179
- name: "Run acceptance tests"
161180
run: |
162181
bundle exec rake 'litmus:acceptance:parallel'
163182
183+
- name: Wait as long as the file ${HOME}/pause file is present
184+
if: ${{ always() && github.event.inputs.ssh-debugging == true }}
185+
run: |
186+
while [ -f "${HOME}/pause" ] ; do
187+
echo "${HOME}/pause present, sleeping for 60 seconds..."
188+
sleep 60
189+
done
190+
echo "${HOME}/pause absent, continuing workflow."
191+
164192
- name: "Remove test environment"
165193
if: ${{ always() }}
166194
continue-on-error: true

0 commit comments

Comments
 (0)