diff --git a/build-jenkins-agent-windows.pkr.hcl b/build-jenkins-agent-windows.pkr.hcl index 96aeb3b91..4b97584cc 100644 --- a/build-jenkins-agent-windows.pkr.hcl +++ b/build-jenkins-agent-windows.pkr.hcl @@ -95,8 +95,20 @@ build { inline = [ "$ErrorActionPreference = 'Stop'", "goss --version", - "goss --use-alpha=1 --gossfile C:/goss-windows.yaml --loglevel DEBUG validate --retry-timeout 300s", - "goss --use-alpha=1 --gossfile C:/goss-common.yaml --loglevel DEBUG validate --retry-timeout 300s", + "goss --use-alpha=1 --gossfile C:/goss-windows.yaml --loglevel DEBUG validate --retry-timeout 60s", + ] + } + + provisioner "powershell" { + environment_vars = local.provisioning_env_vars + inline = [ + "goss --use-alpha=1 --gossfile C:/goss-common.yaml --loglevel DEBUG validate --retry-timeout 60s", + ] + } + + provisioner "powershell" { + environment_vars = local.provisioning_env_vars + inline = [ "Remove-Item -Force C:/goss-windows.yaml", "Remove-Item -Force C:/goss-common.yaml", "Remove-Item -Force C:/visualstudio.vsconfig", diff --git a/goss/goss-windows.yaml b/goss/goss-windows.yaml index ac7d50871..ae32fd823 100644 --- a/goss/goss-windows.yaml +++ b/goss/goss-windows.yaml @@ -55,12 +55,11 @@ command: stdout: - 2.4.1 visualstudio: - exec: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe -nologo -version + exec: ("C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" "/nologo" "/version") exit-status: 0 stdout: - /16\.\d+\.\d+\.\d+/ - skip: | - {{ not (eq .Env.AGENT_OS_VERSION "2019") }} + skip: {{ not (eq .Env.AGENT_OS_VERSION "2019") }} file: C:\Program Files\Chromium\Application\: contains: [] diff --git a/updatecli/updatecli.d/jdk11.yml b/updatecli/updatecli.d/jdk11.yml index a893cd479..f53bf7f0c 100644 --- a/updatecli/updatecli.d/jdk11.yml +++ b/updatecli/updatecli.d/jdk11.yml @@ -50,6 +50,7 @@ targets: name: Update the JDK11 version in the goss test kind: yaml spec: + engine: "yamlpath" files: - goss/goss-linux.yaml - goss/goss-windows.yaml diff --git a/updatecli/updatecli.d/jdk17.yml b/updatecli/updatecli.d/jdk17.yml index 2a9665464..6e206f8dc 100644 --- a/updatecli/updatecli.d/jdk17.yml +++ b/updatecli/updatecli.d/jdk17.yml @@ -50,6 +50,7 @@ targets: name: Update the JDK17 version in the goss test kind: yaml spec: + engine: "yamlpath" files: - goss/goss-linux.yaml - goss/goss-windows.yaml diff --git a/updatecli/updatecli.d/jdk21.yml b/updatecli/updatecli.d/jdk21.yml index 975818ff9..28752996d 100644 --- a/updatecli/updatecli.d/jdk21.yml +++ b/updatecli/updatecli.d/jdk21.yml @@ -48,6 +48,7 @@ targets: name: Update the JDK21 version in the goss test kind: yaml spec: + engine: "yamlpath" files: - goss/goss-linux.yaml - goss/goss-windows.yaml diff --git a/updatecli/updatecli.d/jdk8.yml b/updatecli/updatecli.d/jdk8.yml index 77a5eb69f..0fc886b37 100644 --- a/updatecli/updatecli.d/jdk8.yml +++ b/updatecli/updatecli.d/jdk8.yml @@ -54,6 +54,7 @@ targets: captureindex: 1 - addprefix: '1.8.0_' spec: + engine: "yamlpath" files: - goss/goss-linux.yaml - goss/goss-windows.yaml diff --git a/updatecli/updatecli.d/nodejs-windows.yml b/updatecli/updatecli.d/nodejs-windows.yml index 10e204af3..213a1583c 100644 --- a/updatecli/updatecli.d/nodejs-windows.yml +++ b/updatecli/updatecli.d/nodejs-windows.yml @@ -54,6 +54,7 @@ targets: sourceid: lastReleaseVersion kind: yaml spec: + engine: "yamlpath" files: - goss/goss-windows.yaml key: $.command.nodejs.stdout[0] diff --git a/updatecli/updatecli.d/pwsh.yml b/updatecli/updatecli.d/pwsh.yml index 92f3b0549..c9e8d9e14 100644 --- a/updatecli/updatecli.d/pwsh.yml +++ b/updatecli/updatecli.d/pwsh.yml @@ -47,12 +47,13 @@ targets: kind: yaml spec: file: "provisioning/tools-versions.yml" - key: "windows_pwsh_version" + key: $.windows_pwsh_version scmid: default updatePwshVersionInGoss: name: Update the `Pwsh` version in the goss test kind: yaml spec: + engine: "yamlpath" files: - "goss/goss-windows.yaml" key: $.command.pwsh.stdout[0] diff --git a/updatecli/updatecli.d/python3.yml b/updatecli/updatecli.d/python3.yml index f4b852e23..18a3e5e2c 100644 --- a/updatecli/updatecli.d/python3.yml +++ b/updatecli/updatecli.d/python3.yml @@ -43,6 +43,7 @@ targets: name: Update the `python3` version in the goss test kind: yaml spec: + engine: "yamlpath" files: - "goss/goss-windows.yaml" #fixed only on windows key: $.command.python3.stdout[0] diff --git a/updatecli/updatecli.d/ruby.yml b/updatecli/updatecli.d/ruby.yml index d6bbd2ae5..b529c4963 100644 --- a/updatecli/updatecli.d/ruby.yml +++ b/updatecli/updatecli.d/ruby.yml @@ -20,7 +20,7 @@ sources: name: "Get the latest Ruby version" spec: image: "ruby" - tagFilter: >- + tagfilter: >- \d\.\d\.\d$ versionfilter: kind: regex @@ -58,6 +58,7 @@ targets: sourceid: rubyDockerImageLatestVersion kind: yaml spec: + engine: "yamlpath" files: - goss/goss-windows.yaml key: $.command.ruby.stdout[0] diff --git a/updatecli/updatecli.d/vagrant.yml b/updatecli/updatecli.d/vagrant.yml index 0509fa6e2..157e46181 100644 --- a/updatecli/updatecli.d/vagrant.yml +++ b/updatecli/updatecli.d/vagrant.yml @@ -49,6 +49,7 @@ targets: name: "Update the `vagrant` version in the goss test" kind: yaml spec: + engine: "yamlpath" files: - goss/goss-windows.yaml # windows only as the linux arm64 vagrant version is not pinned key: $.command.vagrant.stdout[0]