Skip to content

Commit 16e0dca

Browse files
committed
Update cygwin sha in windows build Dockerfile
Signed-off-by: Stewart X Addison <[email protected]>
1 parent 9de088b commit 16e0dca

File tree

4 files changed

+40
-11
lines changed

4 files changed

+40
-11
lines changed

.github/workflows/build_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ permissions:
2626
jobs:
2727
build:
2828
if: startsWith(github.repository, 'adoptium/')
29-
runs-on: windows-latest
29+
runs-on: windows-2022
3030
steps:
3131
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3232

ansible/docker/Dockerfile.win2022

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG PW=T3mp=Passwd
66
# Download Cygwin Bootstrapper & Verify Its Checksum
77
RUN powershell -Command \
88
"wget -UseBasicParsing https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe; \
9-
$expectedChecksum = 'e7815d360ab098fdd1f03f10f43f363c73a632e8866e304c72573cf1e6a0dec8'; \
9+
$expectedChecksum = '46993d76d756bde18564f72a4ee07384cd82b447527ca406c8bfc034cb05c664'; \
1010
$fileChecksum = CertUtil -hashfile setup-x86_64.exe SHA256 | Select-String -Pattern '([A-Fa-f0-9]{64})' | ForEach-Object { $_.Matches[0].Groups[1].Value }; \
1111
if ($fileChecksum -ne $expectedChecksum) { \
1212
Write-Host 'Checksum verification failed!' -ForegroundColor Red; \
@@ -17,15 +17,15 @@ RUN powershell -Command \
1717
}"
1818

1919
# 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+
RUN setup-x86_64.exe --packages ansible --download --local-install --delete-orphans --site https://cygwin.mirror.constant.com --local-package-dir c:\cygwin_packages --root C:\cygwin64 --wait --quiet-mode && \
2121
del setup-x86_64.exe && \
2222
setx PATH "c:\cygwin64\bin;%PATH%" && \
2323
mkdir c:\temp
2424

2525
# Download Ansible Config Script & Verify Its Checksum
2626
RUN powershell -Command \
2727
"wget https://raw.githubusercontent.com/ansible/ansible/dd4c56e4d68664e4a50292aa19ea61b15c92287c/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile ConfigureRemotingForAnsible.ps1; \
28-
$expectedChecksum = '201ad16584f79292044dc21c78c6688dce07f94d769f5e69631b46c3c13036fc'; \
28+
$expectedChecksum = '201ad16584f79292044dc21c78c6688dce07f94d769f5e69631b46c3c13036fc'; \
2929
$fileChecksum = CertUtil -hashfile ConfigureRemotingForAnsible.ps1 SHA256 | Select-String -Pattern '([A-Fa-f0-9]{64})' | ForEach-Object { $_.Matches[0].Groups[1].Value }; \
3030
if ($fileChecksum -ne $expectedChecksum) { \
3131
Write-Host 'Checksum verification failed!' -ForegroundColor Red; \
@@ -50,7 +50,7 @@ RUN net user ansible %PW% /ADD & net localgroup "Administrators" ansible /ADD &
5050
sed -i -e 's/hosts: .*/hosts: localhost/' infrastructure/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \
5151
echo localhost ansible_connection=winrm > infrastructure/ansible/hosts && \
5252
cd infrastructure\ansible && \
53-
C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-playbook -e git_sha=00000000 -e ansible_user=ansible -e ansible_password=%PW% -i hosts \
53+
C:\cygwin64\bin\python3.7m.exe /usr/bin/ansible-playbook -vv -e git_sha=00000000 -e ansible_user=ansible -e ansible_password=%PW% -i hosts \
5454
--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 && \
5555
net user ansible /DELETE
5656

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

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,37 @@
6363
register: ant_contrib_installed
6464
tags: ANT
6565

66-
- name: Download ant-contrib
67-
win_shell: c:\cygwin64\bin\curl -L -o /cygdrive/c/temp/ant-contrib.zip https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.zip
68-
when: (not ant_contrib_installed.stat.exists)
69-
tags: ANT
66+
# NOTE: This is commented out and replaced with a manual invocation of sha256sum
67+
# afterwards because this was not workin consistently. It is left here as
68+
# we need further diagnosis to understand why this is not working.
69+
# Specifically is it failing in the github actions run for build image gen
70+
71+
- name: Download ant-contrib with curl
72+
win_shell: c:\cygwin64\bin\curl -Lo c:\temp\ant-contrib.zip https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.zip
73+
#- name: Download ant-contrib
74+
# win_get_url:
75+
# url: https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.zip
76+
# dest: c:\temp\ant-contrib.zip
77+
# force: no
78+
# checksum: 22bae6c3ddf1a464b285784599eef8698f64dde24378c77e42522a536b88cbbc
79+
# checksum_algorithm: sha256
80+
# when: (not ant_contrib_installed.stat.exists)
81+
# tags: ANT
82+
83+
- name: "Check sha256sum of ant-contrib.zip with PowerShell"
84+
win_shell: |
85+
$filePath = "c:\temp\ant-contrib.zip"
86+
$expectedChecksum = "22bae6c3ddf1a464b285784599eef8698f64dde24378c77e42522a536b88cbbc"
87+
$actualChecksum = Get-FileHash -Path $filePath -Algorithm SHA256 | Select-Object -ExpandProperty Hash
88+
89+
if ($actualChecksum -ne $expectedChecksum) {
90+
Write-Output "Checksum mismatch"
91+
Write-Output "Actual Checksum: $actualChecksum"
92+
Write-Output "Expect Checksum: $expectedChecksum"
93+
exit 1
94+
}
95+
register: checksum_result
96+
failed_when: checksum_result.rc != 0
7097

7198
- name: Unzip ant-contrib
7299
win_unzip:
@@ -76,7 +103,7 @@
76103
when: (not ant_contrib_installed.stat.exists)
77104
tags: ANT
78105

79-
- name: Copy the ant-contrib.jar to ANT's lib folder
106+
- name: "Copy the ant-contrib.jar to ANT's lib folder"
80107
win_copy:
81108
src: C:\temp\ant-contrib\ant-contrib\lib\ant-contrib.jar
82109
dest: C:\apache-ant\apache-ant-{{ ant_version }}\lib\ant-contrib.jar
@@ -91,4 +118,5 @@
91118
with_items:
92119
- ant-contrib.zip
93120
- ant.zip
121+
- ant-contrib.sha256
94122
tags: ANT

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
- name: Download Strawberry Perl
1919
win_get_url:
20-
url: http://strawberryperl.com/download/5.26.0.1/strawberry-perl-5.26.0.1-64bit.zip
20+
# url: https://strawberryperl.com/download/5.26.0.1/strawberry-perl-5.26.0.1-64bit.zip
21+
url: https://ci.adoptium.net/userContent/winansible/strawberry-perl-5.26.0.1-64bit.zip
2122
dest: C:\temp\strawberry-perl.zip
2223
checksum: 0f89ce99be64679f930e9cca25ccec09de8aff2fc5db3c0dd4158d9606532ad5
2324
checksum_algorithm: sha256

0 commit comments

Comments
 (0)