|
26 | 26 | description: "Disable and stop apparmor" |
27 | 27 | default: false |
28 | 28 | type: boolean |
| 29 | + ssh-debugging: |
| 30 | + description: Boolean; whether or not to pause for ssh debugging |
| 31 | + required: true |
| 32 | + default: false |
29 | 33 |
|
30 | 34 |
|
31 | 35 | # ENABLE PUPPETCORE. The calling workflow must: |
@@ -119,7 +123,12 @@ jobs: |
119 | 123 | sudo systemctl disable apparmor |
120 | 124 | sudo systemctl stop apparmor |
121 | 125 | 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 }} |
123 | 132 | - name: "Setup ruby" |
124 | 133 | uses: "ruby/setup-ruby@v1" |
125 | 134 | with: |
@@ -157,10 +166,29 @@ jobs: |
157 | 166 | run: | |
158 | 167 | bundle exec rake 'litmus:install_module' |
159 | 168 |
|
| 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 | +
|
160 | 179 | - name: "Run acceptance tests" |
161 | 180 | run: | |
162 | 181 | bundle exec rake 'litmus:acceptance:parallel' |
163 | 182 |
|
| 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 | +
|
164 | 192 | - name: "Remove test environment" |
165 | 193 | if: ${{ always() }} |
166 | 194 | continue-on-error: true |
|
0 commit comments