1
1
---
2
- name : " Add Compiler test"
3
-
2
+ name : Add Compiler 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 : ' large'
13
+ default : large
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
21
default : ' false'
23
-
24
22
jobs :
25
23
test-add-compiler :
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"
51
- uses : actions/checkout@v4
52
-
53
- - name : " Activate Ruby 2.7"
43
+ - name : Checkout Source
44
+ uses : actions/checkout@v2
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 added compiler)'
56
+ - name : Provision test cluster (specified architecture with added compiler)
67
57
timeout-minutes : 15
68
58
run : |
69
59
echo ::group::prepare
@@ -73,60 +63,51 @@ 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 }}-with-extra-compiler
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 \
97
83
--inventoryfile spec/fixtures/litmus_inventory.yaml \
98
84
--modulepath spec/fixtures/modules \
99
85
architecture=${{ matrix.architecture }} \
100
- version=${{ matrix.version }} \
101
- console_password=${{ secrets.CONSOLE_PASSWORD }}
102
-
103
- - name : ' Run add_compiler plan'
86
+ version=${{ matrix.version }}
87
+ - name : Run add_compiler plan
104
88
timeout-minutes : 50
105
89
run : |
106
90
bundle exec bolt plan run peadm_spec::add_compiler -v \
107
91
--inventoryfile spec/fixtures/litmus_inventory.yaml \
108
92
--modulepath spec/fixtures/modules \
109
93
architecture=${{ matrix.architecture }} \
110
94
--stream
111
-
112
- - 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
113
96
if : ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
114
97
run : |
115
98
while [ -f "${HOME}/pause" ] ; do
116
99
echo "${HOME}/pause present, sleeping for 60 seconds..."
117
100
sleep 60
118
101
done
119
102
echo "${HOME}/pause absent, continuing workflow."
120
-
121
- - name : ' Tear down test cluster'
103
+ - name : Tear down test cluster
122
104
if : ${{ always() }}
123
105
continue-on-error : true
124
- run : |
106
+ run : |-
125
107
if [ -f spec/fixtures/litmus_inventory.yaml ]; then
126
108
echo ::group::tear_down
127
109
bundle exec rake 'litmus:tear_down'
128
110
echo ::endgroup::
129
-
130
111
echo ::group::info:request
131
112
cat request.json || true; echo
132
113
echo ::endgroup::
0 commit comments