diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml index f4afae4584..60c7789130 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml @@ -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 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml index cb1484d8ce..d4fd79140f 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Debian.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Debian.yml index b01c36206c..0da1c4dbed 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Debian.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Debian.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml index 73b5da6ab0..e81cb80544 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/FreeBSD.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/FreeBSD.yml index b316c33c8e..d34fb2bc75 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/FreeBSD.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/FreeBSD.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml index 8f1ddd0797..11a8aa4d87 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/RedHat.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml index 6eed1c2b5a..3de6fa65a0 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Ubuntu.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Ubuntu.yml index 17c1372ca1..37ffdfd28b 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Ubuntu.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Ubuntu.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/build_packages_and_tools.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/build_packages_and_tools.yml index c5b02964a9..0a7bc0226c 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/build_packages_and_tools.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/build_packages_and_tools.yml @@ -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 }}" diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/main.yml index e12179c71e..20e78dd920 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/main.yml @@ -20,7 +20,7 @@ ######################## - name: Include OS variables include_vars: "../vars/{{ ansible_distribution }}.yml" - tags: [build_tools, install_java, main, test_tools] + tags: main ############################## # OS setup and configuration # @@ -28,9 +28,7 @@ # 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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/openSUSE.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/openSUSE.yml index 65f33d237c..d527fadf8c 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/openSUSE.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/openSUSE.yml @@ -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 # diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022/tasks/main.yml index 1d1638e9c6..52ae7f602f 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022/tasks/main.yml @@ -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 diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/WiX/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/WiX/tasks/main.yml index d638610305..2b09eff7c9 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/WiX/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/WiX/tasks/main.yml @@ -13,11 +13,38 @@ 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 @@ -25,6 +52,13 @@ - 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