Skip to content

Commit

Permalink
WinPB: Update Wix Installation To Install SDK (#3624)
Browse files Browse the repository at this point in the history
* WinPB: Update Wix Installation To Install SDK and use correct windows become method.

* Linter Fix.

* Linter Fix: FQ Run As Method

* WindowsPB: Remove redundant output var

* WinPB: Update VS2022 CE Download Checksum
  • Loading branch information
steelhead31 authored and aswinkr77 committed Jun 27, 2024
1 parent 8374f90 commit b5d661a
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

- name: Checking for /usr/lib/jvm
stat: path=/usr/lib/jvm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
- name: Set package manager var
set_fact:
package_var: "latest"
tags: [build_tools, test_tools]

- name: Set package manager var for FreeBSD
set_fact:
package_var: "present"
when:
- ansible_distribution == "FreeBSD"
tags: [build_tools, test_tools]

- name: Install Build Tool Packages
package: "name={{ item }} state={{ package_var }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@
########################
- name: Include OS variables
include_vars: "../vars/{{ ansible_distribution }}.yml"
tags: [build_tools, install_java, main, test_tools]
tags: main

##############################
# OS setup and configuration #
##############################
# If this errors, upgrade ansible to >=2.4
- name: Perform OS setup and configuration
include_tasks: "{{ ansible_distribution }}.yml"
tags: [adoptopenjdk, azul-key, brew_cu, brew_upgrade, build_tools, build_tools_jfx, core_dump, cups, default_java,
expat, freetype, install_java, java8_SLES11, java8_SUSE, jck_tools, jenkins_user, kernel_tuning, libffi_sles,
locales, main, patch_update, rosetta, solaris_studio, SUSE_gcc48, test_tools, zlib]
tags: main

###################
# cmake on armv7l #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
############################
- name: Call Build Packages and Tools Task
include_tasks: build_packages_and_tools.yml
tags: [build_tools, test_tools]

##########################
# Additional build tools #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
- name: Download Visual Studio Community 2022
win_get_url:
url: 'https://aka.ms/vs/17/release/vs_Community.exe'
checksum: d757db0e5ac12b73d1f1bad8f0de05f0974a268c6a720324ea93239c6872a94e
checksum: 5d75942b56df540a0325e764e7eb46498ec12e15b73adea05d8aa58d323efd90
checksum_algorithm: sha256
dest: 'C:\temp\vs_community22.exe'
force: no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,52 @@
register: wix_installed
tags: Wix

- name: Test if DotNet SDK is already installed
win_stat:
path: 'C:\\Program Files\dotnet\dotnet.exe'
register: dotnet_installed
tags: Wix

- name: Download .NET Installer
win_get_url:
url: https://download.visualstudio.microsoft.com/download/pr/b6f19ef3-52ca-40b1-b78b-0712d3c8bf4d/426bd0d376479d551ce4d5ac0ecf63a5/dotnet-sdk-8.0.302-win-x64.exe
dest: 'C:\temp\dotnet-install.exe'
checksum: bc6019e0192edd180ca7b299a16b95327941b0b53806cdb125be194aea12492d
checksum_algorithm: sha256
when: (not dotnet_installed.stat.exists)
tags: Wix

- name: Install .NET SDK If dotnet not installed
raw: C:\temp\dotnet-install.exe /quiet
when: (not dotnet_installed.stat.exists)
tags: Wix

- name: Test if WiX is already installed
win_stat:
path: 'C:\\Users\{{ Jenkins_Username }}\.dotnet/tools/wix'
register: wix_installed
tags: Wix

- name: Test WiX version
# generates an output like 5.0.0+41e11442
win_shell: wix --version
register: installed_wix_version
become_user: "{{ Jenkins_Username }}"
become_method: ansible.builtin.runas
become: true
when: wix_installed.stat.exists
tags: Wix

- name: Install Wix Toolset when not installed or version is not correct
win_shell: dotnet tool install --global wix --version {{ wix_version }}
become_user: "{{ Jenkins_Username }}"
become_method: ansible.builtin.runas
become: true
when: (not wix_installed.stat.exists) or (installed_wix_version.stdout.find(wix_version) == -1)
tags: Wix

- name: Delete downloaded .NET installer
win_file:
path: 'C:\temp\dotnet-install.exe'
state: absent
tags: Wix

0 comments on commit b5d661a

Please sign in to comment.