11---
2- name : " Add Replica test"
3-
2+ name : Add Replica test
43on :
54 workflow_dispatch :
65 inputs :
76 image :
8- description : " GCP image for test cluster"
7+ description : GCP image for test cluster
98 required : true
10- default : " almalinux-cloud/almalinux-8"
9+ default : almalinux-cloud/almalinux-8
1110 architecture :
12- description : " PE architecture to test"
11+ description : PE architecture to test
1312 required : true
14- default : " standard"
13+ default : standard
1514 version :
16- description : " PE version to install"
15+ description : PE version to install
1716 required : true
18- default : " 2021.7.8"
17+ default : 2021.7.8
1918 ssh-debugging :
20- description : " Boolean; whether or not to pause for ssh debugging"
19+ description : Boolean; whether or not to pause for ssh debugging
2120 required : true
22- default : " false"
23-
21+ default : ' false'
2422jobs :
2523 test-add-replica :
26- name : " PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}"
24+ name : PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}
2725 runs-on : ubuntu-20.04
2826 env :
2927 BOLT_GEM : true
3028 BOLT_DISABLE_ANALYTICS : true
31- LANG : " en_US.UTF-8"
29+ LANG : en_US.UTF-8
3230 strategy :
3331 fail-fast : false
3432 matrix :
35- architecture :
36- - " ${{ github.event.inputs.architecture }}"
37- version :
38- - " ${{ github.event.inputs.version }}"
39- image :
40- - " ${{ github.event.inputs.image }}"
41-
33+ architecture : ['${{ github.event.inputs.architecture }}']
34+ version : ['${{ github.event.inputs.version }}']
35+ image : ['${{ github.event.inputs.image }}']
4236 steps :
43- - name : " Start SSH session"
37+ - name : Start SSH session
4438 if : ${{ github.event.inputs.ssh-debugging == 'true' }}
4539 uses : luchihoratiu/debug-via-ssh@main
4640 with :
4741 NGROK_AUTH_TOKEN : ${{ secrets.NGROK_AUTH_TOKEN }}
4842 SSH_PASS : ${{ secrets.SSH_PASS }}
49-
50- - name : " Checkout Source"
43+ - name : Checkout Source
5144 uses : actions/checkout@v4
52-
53- - name : " Activate Ruby 2.7"
45+ - name : Activate Ruby 2.7
5446 uses : ruby/setup-ruby@v1
5547 with :
56- ruby-version : " 2.7"
48+ ruby-version : ' 2.7'
5749 bundler-cache : true
58-
59- - name : " Print bundle environment"
50+ - name : Print bundle environment
6051 if : ${{ github.repository_owner == 'puppetlabs' }}
6152 run : |
6253 echo ::group::info:bundler
6354 bundle env
6455 echo ::endgroup::
65-
66- - name : " Provision test cluster (specified architecture with spare replica)"
56+ - name : Provision test cluster (specified architecture with spare replica)
6757 timeout-minutes : 15
6858 run : |
6959 echo ::group::prepare
@@ -73,24 +63,20 @@ jobs:
7363 echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
7464 bundle exec rake spec_prep
7565 echo ::endgroup::
76-
7766 echo ::group::provision
7867 bundle exec bolt plan run peadm_spec::provision_test_cluster \
7968 --modulepath spec/fixtures/modules \
8069 provider=provision_service \
8170 image=${{ matrix.image }} \
8271 architecture=${{ matrix.architecture }}-and-spare-replica
8372 echo ::endgroup::
84-
8573 echo ::group::info:request
8674 cat request.json || true; echo
8775 echo ::endgroup::
88-
8976 echo ::group::info:inventory
9077 sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
9178 echo ::endgroup::
92-
93- - name : " Install PE on test cluster"
79+ - name : Install PE on test cluster
9480 timeout-minutes : 120
9581 run : |
9682 bundle exec bolt plan run peadm_spec::install_test_cluster \
@@ -99,33 +85,29 @@ jobs:
9985 architecture=${{ matrix.architecture }} \
10086 version=${{ matrix.version }} \
10187 console_password=${{ secrets.CONSOLE_PASSWORD }}
102-
103- - name : " Run add_replica plan"
88+ - name : Run add_replica plan
10489 timeout-minutes : 60
10590 run : |
10691 bundle exec bolt plan run peadm_spec::add_replica -v \
10792 --inventoryfile spec/fixtures/litmus_inventory.yaml \
10893 --modulepath spec/fixtures/modules \
10994 --stream
110-
111- - name : " Wait as long as the file ${HOME}/pause file is present"
95+ - name : Wait as long as the file ${HOME}/pause file is present
11296 if : ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
11397 run : |
11498 while [ -f "${HOME}/pause" ] ; do
11599 echo "${HOME}/pause present, sleeping for 60 seconds..."
116100 sleep 60
117101 done
118102 echo "${HOME}/pause absent, continuing workflow."
119-
120- - name : " Tear down test cluster"
103+ - name : Tear down test cluster
121104 if : ${{ always() }}
122105 continue-on-error : true
123- run : |
106+ run : |-
124107 if [ -f spec/fixtures/litmus_inventory.yaml ]; then
125108 echo ::group::tear_down
126109 bundle exec rake 'litmus:tear_down'
127110 echo ::endgroup::
128-
129111 echo ::group::info:request
130112 cat request.json || true; echo
131113 echo ::endgroup::
0 commit comments