Skip to content

Commit 861fe76

Browse files
authored
Debug should be behind (#740)
1 parent e743433 commit 861fe76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/integration-cml.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ name: "Integration tests 💻"
2727
- "milestone"
2828
- "devel"
2929
default: "devel"
30+
debug:
31+
description: "Enable debug steps"
32+
required: false
33+
type: boolean
34+
default: false
3035
jobs:
3136
lab-create:
3237
uses: ansible/ansible-content-actions/.github/workflows/cml_lab_create.yaml@main
@@ -58,6 +63,7 @@ jobs:
5863
python-version: "3.12"
5964

6065
- name: DEBUG Show pip list before installs
66+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
6167
run: |
6268
python3 -m pip --version
6369
python3 -m pip list | sort
@@ -66,6 +72,7 @@ jobs:
6672
run: python3 -m pip install --upgrade pip wheel ansible-pylibssh paramiko genie passlib scp ncclient ntc_templates pyats jxmlease
6773

6874
- name: DEBUG Show pip list after base deps install
75+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
6976
run: |
7077
python3 -m pip list | sort
7178
@@ -139,6 +146,7 @@ jobs:
139146
fi
140147
141148
- name: DEBUG Show pip list after ansible-core install
149+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
142150
run: |
143151
python3 -m pip list | sort
144152
@@ -149,6 +157,7 @@ jobs:
149157
source_path: /home/runner/collections/ansible_collections/ansible/netcommon
150158

151159
- name: DEBUG lab_nodes input
160+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
152161
shell: bash
153162
env:
154163
LAB_NODES: ${{ needs.lab-create.outputs.lab_nodes_json }}
@@ -217,16 +226,19 @@ jobs:
217226
echo "inventory_path=$out_file" >> "$GITHUB_OUTPUT"
218227
219228
- name: DEBUG Print the ansible version
229+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
220230
run: ansible --version
221231

222232
- name: DEBUG inventory
233+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
223234
shell: bash
224235
run: |
225236
echo "Inventory path: ${{ steps.render_inventory.outputs.inventory_path }}"
226237
echo
227238
cat "${{ steps.render_inventory.outputs.inventory_path }}"
228239
229240
- name: DEBUG libssh and pylibssh versions
241+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug == 'true' || github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'debug') }}
230242
shell: bash
231243
run: python -c "from pylibsshext import __full_version__; print(__full_version__)"
232244

0 commit comments

Comments
 (0)