Skip to content

Commit 34f5cb2

Browse files
committed
skip more OpenJ9 roles
1 parent c8a0de2 commit 34f5cb2

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

.github/workflows/build_windows.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ jobs:
3939
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4040

4141
- name: Build container image
42-
run: docker build \
43-
-t adoptium.azurecr.io/windows2022_build_image:latest \
44-
--build-arg SOURCE_DIR=. \
45-
-f ansible/docker/Dockerfile.win2022 . \
46-
--output 'type=local,dest=C:\infrastructure'
42+
run: docker build -t adoptium.azurecr.io/windows2022_build_image:latest --build-arg git_ref=${{ github.ref }} -f ansible/docker/Dockerfile.win2022 .
4743

4844
- name: Push container image to ACR
4945
if: github.ref == 'refs/heads/master'

ansible/docker/Dockerfile.win2022

+12-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
22

33
# Specify this with --build-arg PW=SomePassword
44
ARG PW=T3mp=Passwd
5+
ARG git_ref=master
56

67
# Download Cygwin Bootstrapper & Verify Its Checksum
78
RUN 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 & \
4547
ENV TERM=dumb
4648

4749
RUN 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

5560
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@
7070
- ANT # Testing
7171
- role: MSVS_2013
7272
when: ansible_architecture == "64-bit"
73-
- role: MSVS_2017 # OpenJ9
74-
when: ansible_architecture == "64-bit"
75-
- role: MSVS_2019 # OpenJ9
76-
tags: MSVS_2019
73+
# - role: MSVS_2017 # OpenJ9
74+
# when: ansible_architecture == "64-bit"
75+
# - role: MSVS_2019 # OpenJ9
76+
# tags: MSVS_2019
7777
- role: MSVS_2022
7878
tags: MSVS_2022
7979
- role: MSVS_2022_REDIST
8080
tags: MSVS_2022_REDIST
81-
- NVidia_Cuda_Toolkit # OpenJ9
81+
# - NVidia_Cuda_Toolkit # OpenJ9
8282
- NTP_TIME
83-
- Clang_64bit # OpenJ9
84-
- Clang_32bit # OpenJ9
85-
- nasm # OpenJ9
83+
# - Clang_64bit # OpenJ9
84+
# - Clang_32bit # OpenJ9
85+
# - nasm # OpenJ9
8686
- Rust # IcedTea-Web
8787
- IcedTea-Web # For Jenkins webstart
8888
- WiX # For creating installers

ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
tags: MSVS_2022_REDIST
2020

2121
- name: Check if C:\openjdk\devkit exists
22-
ansible.windows.win_stat:
22+
win_stat:
2323
path: 'c:\openjdk\devkit'
2424
register: directory_status
2525
tags: MSVS_2022_REDIST
2626

2727
- name: Create C:\openjdk\devkit if it does not exist
28-
ansible.windows.win_file:
28+
win_file:
2929
path: 'c:\openjdk\devkit\'
3030
state: directory
3131
when: not directory_status.stat.exists

0 commit comments

Comments
 (0)