1
1
---
2
- name : " Add Replica test"
3
-
2
+ name : Add Replica test
4
3
on :
5
4
workflow_dispatch :
6
5
inputs :
7
6
image :
8
- description : " GCP image for test cluster"
7
+ description : GCP image for test cluster
9
8
required : true
10
- default : " almalinux-cloud/almalinux-8"
9
+ default : almalinux-cloud/almalinux-8
11
10
architecture :
12
- description : " PE architecture to test"
11
+ description : PE architecture to test
13
12
required : true
14
- default : " standard"
13
+ default : standard
15
14
version :
16
- description : " PE version to install"
15
+ description : PE version to install
17
16
required : true
18
- default : " 2021.7.8"
17
+ default : 2021.7.8
19
18
ssh-debugging :
20
- description : " Boolean; whether or not to pause for ssh debugging"
19
+ description : Boolean; whether or not to pause for ssh debugging
21
20
required : true
22
- default : " false"
23
-
21
+ default : ' false'
24
22
jobs :
25
23
test-add-replica :
26
- name : " PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}"
24
+ name : PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}
27
25
runs-on : ubuntu-20.04
28
26
env :
29
27
BOLT_GEM : true
30
28
BOLT_DISABLE_ANALYTICS : true
31
- LANG : " en_US.UTF-8"
29
+ LANG : en_US.UTF-8
32
30
strategy :
33
31
fail-fast : false
34
32
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 }}']
42
36
steps :
43
- - name : " Start SSH session"
37
+ - name : Start SSH session
44
38
if : ${{ github.event.inputs.ssh-debugging == 'true' }}
45
39
uses : luchihoratiu/debug-via-ssh@main
46
40
with :
47
41
NGROK_AUTH_TOKEN : ${{ secrets.NGROK_AUTH_TOKEN }}
48
42
SSH_PASS : ${{ secrets.SSH_PASS }}
49
-
50
- - name : " Checkout Source"
43
+ - name : Checkout Source
51
44
uses : actions/checkout@v4
52
-
53
- - name : " Activate Ruby 2.7"
45
+ - name : Activate Ruby 2.7
54
46
uses : ruby/setup-ruby@v1
55
47
with :
56
- ruby-version : " 2.7"
48
+ ruby-version : ' 2.7'
57
49
bundler-cache : true
58
-
59
- - name : " Print bundle environment"
50
+ - name : Print bundle environment
60
51
if : ${{ github.repository_owner == 'puppetlabs' }}
61
52
run : |
62
53
echo ::group::info:bundler
63
54
bundle env
64
55
echo ::endgroup::
65
-
66
- - name : " Provision test cluster (specified architecture with spare replica)"
56
+ - name : Provision test cluster (specified architecture with spare replica)
67
57
timeout-minutes : 15
68
58
run : |
69
59
echo ::group::prepare
@@ -73,24 +63,20 @@ jobs:
73
63
echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
74
64
bundle exec rake spec_prep
75
65
echo ::endgroup::
76
-
77
66
echo ::group::provision
78
67
bundle exec bolt plan run peadm_spec::provision_test_cluster \
79
68
--modulepath spec/fixtures/modules \
80
69
provider=provision_service \
81
70
image=${{ matrix.image }} \
82
71
architecture=${{ matrix.architecture }}-and-spare-replica
83
72
echo ::endgroup::
84
-
85
73
echo ::group::info:request
86
74
cat request.json || true; echo
87
75
echo ::endgroup::
88
-
89
76
echo ::group::info:inventory
90
77
sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
91
78
echo ::endgroup::
92
-
93
- - name : " Install PE on test cluster"
79
+ - name : Install PE on test cluster
94
80
timeout-minutes : 120
95
81
run : |
96
82
bundle exec bolt plan run peadm_spec::install_test_cluster \
@@ -99,33 +85,29 @@ jobs:
99
85
architecture=${{ matrix.architecture }} \
100
86
version=${{ matrix.version }} \
101
87
console_password=${{ secrets.CONSOLE_PASSWORD }}
102
-
103
- - name : " Run add_replica plan"
88
+ - name : Run add_replica plan
104
89
timeout-minutes : 60
105
90
run : |
106
91
bundle exec bolt plan run peadm_spec::add_replica -v \
107
92
--inventoryfile spec/fixtures/litmus_inventory.yaml \
108
93
--modulepath spec/fixtures/modules \
109
94
--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
112
96
if : ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
113
97
run : |
114
98
while [ -f "${HOME}/pause" ] ; do
115
99
echo "${HOME}/pause present, sleeping for 60 seconds..."
116
100
sleep 60
117
101
done
118
102
echo "${HOME}/pause absent, continuing workflow."
119
-
120
- - name : " Tear down test cluster"
103
+ - name : Tear down test cluster
121
104
if : ${{ always() }}
122
105
continue-on-error : true
123
- run : |
106
+ run : |-
124
107
if [ -f spec/fixtures/litmus_inventory.yaml ]; then
125
108
echo ::group::tear_down
126
109
bundle exec rake 'litmus:tear_down'
127
110
echo ::endgroup::
128
-
129
111
echo ::group::info:request
130
112
cat request.json || true; echo
131
113
echo ::endgroup::
0 commit comments