File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
deployments/ansible/molecule Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,22 @@ jobs:
177
177
- name : Install test dependencies.
178
178
run : pip3 install --use-pep517 -r ${GITHUB_WORKSPACE}/requirements.txt
179
179
180
+ - name : Download vagrant box
181
+ run : |
182
+ box=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box" ./molecule/config/windows.yml )
183
+ box_version=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box_version" ./molecule/config/windows.yml )
184
+ eval "box_version=${box_version}"
185
+ json=$( wget -nv -O- https://vagrantcloud.com/api/v2/vagrant/${box} )
186
+ url=$( echo "$json" | jq -r ".versions[] | select(.version == \"${box_version}\") | .providers[] | select(.name == \"virtualbox\") | .url" )
187
+ wget -nv -O /tmp/vagrant.box $url
188
+
180
189
- name : Run Molecule tests.
181
190
run : molecule --debug -v --base-config ./molecule/config/windows.yml test -s ${{ matrix.scenario }} -p ${{ matrix.distro }}
182
191
env :
183
192
PY_COLORS : ' 1'
184
193
ANSIBLE_FORCE_COLOR : ' 1'
194
+ MOLECULE_VAGRANT_BOX_URL : /tmp/vagrant.box
195
+ MOLECULE_VAGRANT_BOX_VERSION : " " # version must not be set when using a local box
185
196
186
197
push-release-tag :
187
198
name : Push Release Tag
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ driver:
10
10
platforms :
11
11
- name : " 2016"
12
12
box : cdaf/WindowsServer
13
- box_version : 2022.09.01
13
+ box_version : ${MOLECULE_VAGRANT_BOX_VERSION:-2022.09.01}
14
+ box_url : ${MOLECULE_VAGRANT_BOX_URL}
14
15
cpus : 2
15
16
memory : 4096
16
17
provider_options :
@@ -29,7 +30,8 @@ platforms:
29
30
- " winrm.retry_delay = 10"
30
31
- name : " 2019"
31
32
box : gusztavvargadr/windows-server-2019-standard
32
- box_version : 1809.0.2312
33
+ box_version : ${MOLECULE_VAGRANT_BOX_VERSION:-1809.0.2312}
34
+ box_url : ${MOLECULE_VAGRANT_BOX_URL}
33
35
cpus : 2
34
36
memory : 4096
35
37
provider_options :
@@ -38,7 +40,8 @@ platforms:
38
40
instance_raw_config_args : *vagrant_args
39
41
- name : " 2022"
40
42
box : gusztavvargadr/iis-windows-server
41
- box_version : 2102.0.2312
43
+ box_version : ${MOLECULE_VAGRANT_BOX_VERSION:-2102.0.2312}
44
+ box_url : ${MOLECULE_VAGRANT_BOX_URL}
42
45
cpus : 2
43
46
memory : 4096
44
47
provider_options :
Original file line number Diff line number Diff line change 24
24
src : https://nodejs.org/download/release/v16.20.2/node-v16.20.2-linux-x64.tar.gz
25
25
dest : /usr/local
26
26
remote_src : yes
27
+ register : result
28
+ retries : 5
29
+ delay : 60
30
+ until : result is not failed
27
31
28
32
- name : " create symlinks in /usr/bin"
29
33
file :
You can’t perform that action at this time.
0 commit comments