Build:
  1. 1
  2. 0
2024-06-10 17:41.05: New job: Build using windows-x86_64 in
                                [https://github.com/ocaml-opam/opam-repository-mingw#sunset (69dbd0eda2e75b7085cff45755111c73a7a42d1a)]
2024-06-10 17:41.05: Will push staging image to ocurrent/opam-staging:windows-server-mingw-ltsc2022-opam-amd64

Dockerfile:

# escape=`

# Autogenerated by OCaml-Dockerfile scripts
FROM mcr.microsoft.com/windows/server:10.0.20348.2461 as winget-builder
USER ContainerAdministrator
ADD [ "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle", "C:\\TEMP\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.zip" ]
RUN powershell -Command "Expand-Archive -LiteralPath C:\TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.zip -DestinationPath C:\TEMP\winget-cli -Force"
RUN ren C:\TEMP\winget-cli\AppInstaller_x64.msix AppInstaller_x64.zip
RUN powershell -Command "Expand-Archive -LiteralPath C:\TEMP\winget-cli\AppInstaller_x64.zip -DestinationPath C:\TEMP\winget-cli\ -Force"
RUN mkdir "C:\Program Files\winget-cli" && `
  move "C:\TEMP\winget-cli\\winget.exe" "C:\Program Files\winget-cli\" && `
  move "C:\TEMP\winget-cli\\WindowsPackageManager.dll" "C:\Program Files\winget-cli\" && `
  move "C:\TEMP\winget-cli\\resources.pri" "C:\Program Files\winget-cli\"

FROM mcr.microsoft.com/windows/server:10.0.20348.2461 as opam-builder
USER ContainerAdministrator
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "\\$"') do `
          for /f "delims=" %l in ('cmd /v:on /c "set v=%c&& echo !v:~0,-1!"') do `
            reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "%l"
ENV CYGWIN="nodosfilewarning winsymlinks:native"
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "^[^H]"') do `
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "C:\cygwin64\bin;%c"
ADD [ "https://www.cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe" ]
RUN mkdir C:\cygwin64\lib\cygsympathy && mkdir C:\cygwin64\etc\postinstall
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.cmd", "C:\\cygwin64\\lib\\cygsympathy\\" ]
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.sh", "C:\\cygwin64\\lib\\cygsympathy\\cygsympathy" ]
RUN mklink C:\cygwin64\etc\postinstall\zp_zcygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy
RUN C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --local-package-dir C:\TEMP\cache --root C:\cygwin64 --site https://mirrors.kernel.org/sourceware/cygwin/ --symlink-type=native --packages diffutils,git,make,mingw64-i686-gcc-g++,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,patch && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
RUN awk -i inplace "/(^#)|(^$)/{print;next}{$4=""noacl,""$4; print}" C:\cygwin64\etc\fstab
ENV HOME="C:\cygwin64\home\opam"
RUN C:\cygwin64\bin\bash.exe --login -c "git config --global user.email 'docker@example.com' && git config --global user.name 'Docker' && git config --system core.longpaths true && git config --global --add safe.directory /tmp/opam-sources"
RUN C:\cygwin64\bin\bash.exe --login -c "git clone https://github.com/ocaml/opam /tmp/opam && cd /tmp/opam && cp -P -R -p . ../opam-sources && git checkout cdd59ee5d4b07b2173d2bbdc57a0ddecd153dd4e"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp/opam-sources && cp -P -R -p . ../opam-build-master && cd ../opam-build-master && git checkout cdd59ee5d4b07b2173d2bbdc57a0ddecd153dd4e && git config --global --add safe.directory /tmp/opam-build-master"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp/opam-build-master && make compiler && make lib-pkg"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp/opam-build-master && ./configure --enable-cold-check --with-private-runtime --with-0install-solver && make && make install"
RUN C:\cygwin64\bin\bash.exe --login -c "cd /usr/local/bin && tar -cf /cygdrive/c/opam.tar ."

FROM mcr.microsoft.com/windows/server:10.0.20348.2461
USER ContainerAdministrator
LABEL distro_style="windows"
USER ContainerAdministrator
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "\\$"') do `
          for /f "delims=" %l in ('cmd /v:on /c "set v=%c&& echo !v:~0,-1!"') do `
            reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "%l"
ADD [ "https://aka.ms/vs/17/release/vc_redist.x64.exe", "C:\\TEMP\\" ]
RUN C:\TEMP\vc_redist.x64.exe /install /passive /norestart /log C:\TEMP\vc_redist.log && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
COPY --from=winget-builder [ "C:\\Program Files\\winget-cli", "C:\\Program Files\\winget-cli" ]
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "^[^H]"') do `
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "C:\Program Files\winget-cli;%c"
RUN powershell -Command "$path=(Join-Path $env:LOCALAPPDATA 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState'); New-Item $path -ItemType Directory -Force; '{ """"$schema"""": """"https://aka.ms/winget-settings.schema.json"""", """"telemetry"""": { """"disable"""": """"true"""" } }' | Out-File -encoding ASCII (Join-Path $path 'settings.json')"
RUN winget install --exact --accept-source-agreements --accept-package-agreements Git.Git
ENV CYGWIN="nodosfilewarning winsymlinks:native"
RUN for /f "tokens=1,2,*" %a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path ^| findstr /r "^[^H]"') do `
        reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path /t REG_EXPAND_SZ /f /d "C:\cygwin64\bin;%c"
ADD [ "https://www.cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe" ]
RUN mkdir C:\cygwin64\lib\cygsympathy && mkdir C:\cygwin64\etc\postinstall
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.cmd", "C:\\cygwin64\\lib\\cygsympathy\\" ]
ADD [ "https://raw.githubusercontent.com/metastack/cygsympathy/master/cygsympathy.sh", "C:\\cygwin64\\lib\\cygsympathy\\cygsympathy" ]
RUN mklink C:\cygwin64\etc\postinstall\zp_zcygsympathy.sh C:\cygwin64\lib\cygsympathy\cygsympathy
RUN C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --local-package-dir C:\TEMP\cache --root C:\cygwin64 --site https://mirrors.kernel.org/sourceware/cygwin/ --symlink-type=native --packages curl,diffutils,git,m4,make,mingw64-x86_64-gcc-core,patch,perl,rsync,unzip && `
  powershell -Command "Remove-Item 'C:\TEMP' -Recurse"
RUN awk -i inplace "/(^#)|(^$)/{print;next}{$4=""noacl,""$4; print}" C:\cygwin64\etc\fstab
ADD [ "https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz", "C:\\TEMP\\" ]
RUN C:\cygwin64\bin\bash.exe --login -c "cd /tmp && tar -xf /cygdrive/c/TEMP/opam64.tar.xz && ./opam64/install.sh --prefix=/usr && rm -rf opam64 opam64.tar.xz"
COPY --from=opam-builder [ "C:\\opam.tar", "C:\\TEMP\\" ]
RUN C:\cygwin64\bin\tar.exe -xf /cygdrive/c/TEMP/opam.tar -C /usr/local/bin && del C:\TEMP\opam.tar && `
  mklink C:\cygwin64\bin\opam-dev.exe C:\cygwin64\usr\local\bin\opam.exe && `
  mklink C:\cygwin64\bin\opam-2.2.exe C:\cygwin64\bin\opam-dev.exe
WORKDIR C:\cygwin64\home\opam
ENV HOME="C:\cygwin64\home\opam"
RUN C:\cygwin64\bin\bash.exe --login -c "git config --global user.email 'docker@example.com' && git config --global user.name 'Docker' && git config --system core.longpaths true && git config --global --add safe.directory /home/opam/opam-repository"
COPY [ ".", "C:\\cygwin64\\home\\opam\\opam-repository" ]
ENV OPAMROOT="C:\opam\.opam"
RUN opam init -k local -a "C:\cygwin64\home\opam\opam-repository" --bare --disable-sandboxing
RUN C:\cygwin64\bin\bash.exe --login -c "rm -rf /cygdrive/c/opam/.opam/repo/default/.git"
COPY [ "Dockerfile", "/Dockerfile.opam" ]


2024-06-10 17:41.05: Using cache hint "opam-windows-server-mingw-ltsc2022"
2024-06-10 17:41.05: Waiting for resource in pool OCluster
2024-06-10 17:41.05: Waiting for worker…
2024-06-10 17:41.05: Got resource from pool OCluster
Building on ltsc2022-4
All commits already cached
2024-06-11 01:30.31: Job failed: Disconnected: Switch turned off