From d7200f40cce20170f9d3760c6267cd9f6c644448 Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 16 Oct 2024 09:58:01 +0100 Subject: [PATCH] revert changes to passing build --- ansible/docker/Dockerfile.win2022 | 7 +++---- .../roles/Incredibuild/tasks/main.yml | 13 ++++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ansible/docker/Dockerfile.win2022 b/ansible/docker/Dockerfile.win2022 index 3fa37c6fe0..08eb089eb9 100644 --- a/ansible/docker/Dockerfile.win2022 +++ b/ansible/docker/Dockerfile.win2022 @@ -3,8 +3,6 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022 # Specify this with --build-arg PW=SomePassword ARG PW=T3mp=Passwd -COPY . infrastructure - # Download Cygwin Bootstrapper & Verify Its Checksum RUN powershell -Command \ "wget -UseBasicParsing https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe; \ @@ -46,13 +44,14 @@ RUN PowerShell .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 & \ # Set up WinRM user, clone and run the playbook, then delete the user so it's not in any layer ENV TERM=dumb +COPY . infrastructure + RUN net user ansible %PW% /ADD & net localgroup "Administrators" ansible /ADD & net localgroup "Remote Management Users" ansible /ADD && \ sed -i -e 's/hosts: .*/hosts: localhost/' infrastructure/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \ echo localhost ansible_connection=winrm > infrastructure/ansible/hosts && \ cd infrastructure\ansible && \ - C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-galaxy collection install ansible.windows && \ C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-playbook -e git_sha=00000000 -e ansible_user=ansible -e ansible_password=%PW% -i hosts \ - --skip-tags=adoptopenjdk,reboot,Windows_Updates,NTP_TIME,MSVS_2013,Rust,IcedTea-Web playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \ + --skip-tags=adoptopenjdk,reboot,Windows_Updates,NTP_TIME,MSVS_2013,MSVS_2017,MSVS_2019,NVidia_Cuda_Toolkit,clang_64bit,clang_32bit,nasm,Rust,IcedTea-Web playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \ net user ansible /DELETE ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml index 3a40b70fb8..54643336df 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -3,16 +3,19 @@ # Incredibuild - Configuration Tasks # ####################################### -- name: Check if the ibxbuild service exists - ansible.windows.win_service_info: - name: IBXDashboard +- name: Check if the IBXDashboard service exists + win_shell: | + if (Get-Service -Name 'IBXDashboard' -ErrorAction SilentlyContinue) { + Write-Host "exists" + } register: service_info + changed_when: false - name: Stop the IBX Dashboard service if it exists win_service: name: IBXDashboard state: stopped - when: service_info.exists + when: "'exists' in service_info.stdout" - name: Check if incredibuild.conf file exists win_stat: @@ -31,4 +34,4 @@ win_service: name: IBXDashboard state: started - when: service_info.exists + when: "'exists' in service_info.stdout"