@@ -2,6 +2,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
22
33# Specify this with --build-arg PW=SomePassword
44ARG PW=T3mp=Passwd
5+ ARG git_ref=master
56
67# Download Cygwin Bootstrapper & Verify Its Checksum
78RUN powershell -Command \
@@ -16,8 +17,9 @@ RUN powershell -Command \
1617 Write-Host 'Checksum verification succeeded!' -ForegroundColor Green; \
1718 }"
1819
19- # Set up cygwin with ansible as a bootstrap, and add to system default path
20- RUN setup-x86_64.exe --packages ansible --download --local-install --delete-orphans --site https://mirrors.kernel.org/sourceware/cygwin --local-package-dir c:\cygwin_packages --root C:\cygwin64 --wait --quiet-mode && \
20+ # Set up cygwin with git and ansible as a bootstrap, and add to system default path
21+ RUN setup-x86_64.exe --packages git,ansible --download --local-install --delete-orphans --site https://mirrors.kernel.org/sourceware/cygwin --local-package-dir c:\cygwin_packages --root C:\cygwin64 --wait --quiet-mode && \
22+ C:\cygwin64\bin\git config --system core.autocrlf false && \
2123 del setup-x86_64.exe && \
2224 setx PATH "c:\cygwin64\bin;%PATH%" && \
2325 mkdir c:\temp
@@ -45,11 +47,14 @@ RUN PowerShell .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 & \
4547ENV TERM=dumb
4648
4749RUN net user ansible %PW% /ADD & net localgroup "Administrators" ansible /ADD & net localgroup "Remote Management Users" ansible /ADD && \
48- sed -i -e 's/hosts: .*/hosts: localhost/' infrastructure/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \
49- echo localhost ansible_connection=winrm > infrastructure/ansible/hosts && \
50- cd C:\infrastructure\ansible && \
51- C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-playbook -e git_sha=00000000 -e ansible_user=ansible -e ansible_password=%PW% -i hosts \
52- --skip-tags=adoptopenjdk,reboot,Windows_Updates,NTP_TIME,MSVS_2013,MSVS_2017,MSVS_2019 playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \
50+ C:\cygwin64\bin\git clone https://github.com/adoptium/infrastructure c:/infrastructure && \
51+ cd infrastructure && C:\cygwin64\bin\git fetch origin %git_ref% && C:\cygwin64\bin\git checkout FETCH_HEAD && \
52+ sed -i -e 's/hosts: .*/hosts: localhost/' ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \
53+ echo localhost ansible_connection=winrm > ansible/hosts && \
54+ cd ansible && \
55+ C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-playbook -e git_sha=000000 -e ansible_user=ansible -e ansible_password=%PW% -i hosts \
56+ --skip-tags=adoptopenjdk,reboot,Windows_Updates,NTP_TIME,MSVS_2013,Rust,IcedTea-Web playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \
57+ rmdir /s /q c:\infrastructure && \
5358 net user ansible /DELETE
5459
5560ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
0 commit comments