Skip to content

Commit 7d75d7c

Browse files
authored
Merge pull request #123 from knabben/topic/knabben/fix-nssm-goss
Fixing GOSS command call on Windows build
2 parents 47ad3ae + b33a143 commit 7d75d7c

File tree

5 files changed

+39
-30
lines changed

5 files changed

+39
-30
lines changed

ansible-windows/tasks/common.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Copyright 2024-25 Broadcom, Inc.
22
# SPDX-License-Identifier: MPL-2.0
33

4-
- name: Copy goss binary
5-
win_shell: cp "{{ additional_executables_destination_path }}\\goss.exe" "{{ goss_download_path }}"
4+
- name: Set GOSS_USE_ALPHA environment variable for Windows
5+
ansible.windows.win_environment:
6+
state: present
7+
name: GOSS_USE_ALPHA
8+
value: "1"
9+
level: machine
610

711
- name: Ensure log redirect directory
812
ansible.windows.win_file:
@@ -24,4 +28,4 @@
2428
dependencies:
2529
- VMTools
2630
start_mode: auto
27-
state: started
31+
state: started

goss/goss-command.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ command:
167167
stdout:
168168
- "sandbox = '{{.Vars.pause_image}}'"
169169
- "conf_dir = 'C:/etc/cni/net.d'"
170-
- "bin_dir = 'C:/opt/cni/bin'"
171170
- "root = 'C:\\ProgramData\\containerd\\root'"
172171
- "state = 'C:\\ProgramData\\containerd\\state'"
173172
timeout: 30000

goss/goss-files.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,31 @@ file:
1111
- {{.}}
1212
{{end}}
1313
{{end}}
14-
{{range $name, $vers := index .Vars .Vars.OS .Vars.PROVIDER "files"}}
15-
{{ $name }}:
16-
exists: {{ $vers.exists }}
17-
filetype: {{ $vers.filetype }}
18-
contains: {{ range $vers.contains}}
19-
- {{.}}
14+
{{ if ne .Vars.OS "windows" }} # Linux Only
15+
{{range $name, $vers := index .Vars .Vars.OS .Vars.PROVIDER "files"}}
16+
{{ $name }}:
17+
exists: {{ $vers.exists }}
18+
filetype: {{ $vers.filetype }}
19+
contains: {{ range $vers.contains}}
20+
- {{.}}
21+
{{end}}
2022
{{end}}
21-
{{end}}
22-
# TKG specific changes.
23-
{{range $name, $vers := index .Vars.tkg .Vars.OS "files"}}
24-
{{ $name }}:
25-
exists: {{ $vers.exists }}
26-
filetype: {{ $vers.filetype }}
27-
contains: {{ range $vers.contains}}
28-
- {{.}}
23+
# TKG specific changes.
24+
{{range $name, $vers := index .Vars.tkg .Vars.OS "files"}}
25+
{{ $name }}:
26+
exists: {{ $vers.exists }}
27+
filetype: {{ $vers.filetype }}
28+
contains: {{ range $vers.contains}}
29+
- {{.}}
30+
{{end}}
2931
{{end}}
30-
{{end}}
31-
#VKr STIG specific changes.
32-
{{range $name, $vers := index .Vars.tkg .Vars.OS "stig" "files"}}
33-
{{ $name }}:
34-
exists: {{ $vers.exists }}
35-
filetype: {{ $vers.filetype }}
36-
contains: {{ range $vers.contains}}
37-
- {{.}}
32+
#VKr STIG specific changes.
33+
{{range $name, $vers := index .Vars.tkg .Vars.OS "stig" "files"}}
34+
{{ $name }}:
35+
exists: {{ $vers.exists }}
36+
filetype: {{ $vers.filetype }}
37+
contains: {{ range $vers.contains}}
38+
- {{.}}
39+
{{end}}
3840
{{end}}
39-
{{end}}
41+
{{end}}

goss/goss-vars.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,3 +992,5 @@ tkg:
992992
- "install udf /bin/false"
993993
windows:
994994
files:
995+
996+
ssh_source_url: ""
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"goss_entry_file": "goss/goss.yaml",
3-
"goss_inspect_mode": "true",
3+
"goss_inspect_mode": "false",
44
"goss_skip_install": "true",
5+
"goss_tests_dir": "/image-builder/images/capi/image/goss",
6+
"goss_vars_file": "/image-builder/images/capi/image/goss/goss-vars.yaml",
57
"goss_download_path": "C:\\ProgramData\\Temp\\goss.exe",
6-
"goss_remote_folder": "C:\\goss",
7-
"goss_remote_path": "C:\\goss\\goss"
8+
"goss_remote_folder": "",
9+
"goss_remote_path": ""
810
}

0 commit comments

Comments
 (0)