From 3fdbeddd28302cbfd496b7088896fc9b6c1cf07a Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 15 Oct 2024 15:27:18 +0100 Subject: [PATCH] fail on exit code of 1 --- .github/workflows/build.yml | 5 +++++ .github/workflows/build_vagrant.yml | 2 +- .github/workflows/build_windows.yml | 2 +- .github/workflows/build_wsl.yml | 2 +- FAQ.md | 2 +- ansible/docker/Dockerfile.win2022 | 13 +++++++------ 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 553b2f6f58..e0a456b0ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,11 @@ on: branches: - master +# Cancel existing runs if user makes another push. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + permissions: contents: read diff --git a/.github/workflows/build_vagrant.yml b/.github/workflows/build_vagrant.yml index b6b51eb51f..029b946941 100644 --- a/.github/workflows/build_vagrant.yml +++ b/.github/workflows/build_vagrant.yml @@ -10,7 +10,7 @@ on: # Cancel existing runs if user makes another push. concurrency: - group: "${{ github.ref }}" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 7229678e2a..f863597109 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -16,7 +16,7 @@ on: # Cancel existing runs if user makes another push. concurrency: - group: "${{ github.ref }}" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: diff --git a/.github/workflows/build_wsl.yml b/.github/workflows/build_wsl.yml index 2e81b342fe..e59d2e2138 100644 --- a/.github/workflows/build_wsl.yml +++ b/.github/workflows/build_wsl.yml @@ -14,7 +14,7 @@ on: # Cancel existing runs if user makes another push. concurrency: - group: "${{ github.ref }}" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: diff --git a/FAQ.md b/FAQ.md index 6529c738bf..08e3afa360 100644 --- a/FAQ.md +++ b/FAQ.md @@ -89,7 +89,7 @@ have at the moment: | [Centos6](./ansible/docker/Dockerfile.CentOS6) | [`adoptopenjdk/centos6_build_image`](https://hub.docker.com/r/adoptopenjdk/centos6_build_image)| linux/amd64 | [GH Actions](.github/workflows/build.yml) | Yes | [Alpine3](./ansible/docker/Dockerfile.Alpine3) | [`adoptopenjdk/alpine3_build_image`](https://hub.docker.com/r/adoptopenjdk/alpine3_build_image) | linux/x64 & linux/arm64 | [Jenkins](https://ci.adoptium.net/job/centos7_docker_image_updater/) | Yes | [Ubuntu 20.04 (riscv64 only)](./ansible/docker/Dockerfile.Ubuntu2004-riscv64) | [`adoptopenjdk/ubuntu2004_build_image:linux-riscv64`](https://hub.docker.com/r/adoptopenjdk/ubuntu2004_build_image) | linux/riscv64 | [Jenkins](https://ci.adoptium.net/job/centos7_docker_image_updater/) | Yes -| [Windows Server 2022](./ansible/docker/Dockerfile.win2022) | n/a - restricted | Windows | No +| [Windows Server 2022](./ansible/docker/Dockerfile.win2022) | `adoptium.azurecr.io/windows2022_build_image` - restricted | Windows | [GH Actions](.github/workflows/build_windows.yml) | Yes
(*) - Caveats: diff --git a/ansible/docker/Dockerfile.win2022 b/ansible/docker/Dockerfile.win2022 index 173d0d66e6..cccf47a421 100644 --- a/ansible/docker/Dockerfile.win2022 +++ b/ansible/docker/Dockerfile.win2022 @@ -45,13 +45,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 -RUN net user ansible %PW% /ADD & net localgroup "Administrators" ansible /ADD & net localgroup "Remote Management Users" ansible /ADD & \ - C:\cygwin64\bin\git clone https://github.com/sxa/infrastructure -b windows_docker_support c:/infrastructure & \ - 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 & \ +RUN net user ansible %PW% /ADD & net localgroup "Administrators" ansible /ADD & net localgroup "Remote Management Users" ansible /ADD && \ + C:\cygwin64\bin\git clone https://github.com/sxa/infrastructure -b wind-noant c:/infrastructure && \ + 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-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,MSVS_2017,MSVS_2019 playbooks/AdoptOpenJDK_Windows_Playbook/main.yml & \ + --skip-tags=adoptopenjdk,reboot,Windows_Updates,NTP_TIME,MSVS_2013,MSVS_2017,MSVS_2019 playbooks/AdoptOpenJDK_Windows_Playbook/main.yml && \ + rmdir /s /q c:\infrastructure && \ net user ansible /DELETE ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]