Skip to content

Commit

Permalink
revert changes to passing build
Browse files Browse the repository at this point in the history
  • Loading branch information
George Adams committed Oct 16, 2024
1 parent c27ffc1 commit d7200f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
7 changes: 3 additions & 4 deletions ansible/docker/Dockerfile.win2022
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -31,4 +34,4 @@
win_service:
name: IBXDashboard
state: started
when: service_info.exists
when: "'exists' in service_info.stdout"

0 comments on commit d7200f4

Please sign in to comment.