diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63b919bc52..2f78e06577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,10 +25,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Docker Buildx to use cache feature - uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Login to Docker Hub uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 @@ -39,7 +39,7 @@ jobs: - name: Docker Build CentOS6 Image Test - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: file: ./ansible/docker/Dockerfile.CentOS6 build-args: git_sha=${{ github.sha }} @@ -50,7 +50,7 @@ jobs: if: github.ref != 'refs/heads/master' - name: Docker Build & Push Centos6 Image to Docker Hub On Merge - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: file: ./ansible/docker/Dockerfile.CentOS6 build-args: git_sha=${{ github.sha }} @@ -65,13 +65,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Docker Buildx to use cache feature - uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 + uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 - name: Docker Build Alpine3 Image - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: file: ./ansible/docker/Dockerfile.Alpine3 build-args: git_sha=${{ github.sha }} diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 1bdfe7a994..7b70f14eb0 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -22,21 +22,20 @@ jobs: - os: [macos-14] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Install Python run: brew install python@3.12 --overwrite + - name: Configure dirmgr + run: | + mkdir -p ~/.gnupg/ + touch ~/.gnupg/dirmngr.conf + echo "standard-resolver" > ~/.gnupg/dirmngr.conf + - name: Install Ansible run: brew install ansible - # This is to fix an issue with the github macos14 runner, that cant resolve keyserver.ubuntu.com - # but this does work when replaced with the IP address. Spotted during the GPG verification of ANT step - # Upstream Bug : https://github.com/actions/runner-images/issues/9777 - - name: Replace keyserver address with IP address - run: | - sed -i '' 's/keyserver\.ubuntu\.com/185.125.188.27/g' ansible/playbooks/Supporting_Scripts/package_signature_verification.sh - - name: Run Ansible Playbook run: | echo "localhost ansible_user=runner ansible_connection=local" > ansible/hosts diff --git a/.github/workflows/build_qemu.yml b/.github/workflows/build_qemu.yml index 31c8b79331..0c9e87aca8 100644 --- a/.github/workflows/build_qemu.yml +++ b/.github/workflows/build_qemu.yml @@ -36,10 +36,10 @@ jobs: # distro: jessie steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Run on architecture - uses: uraimo/run-on-arch-action@b0ffb25eb00af00468375982384441f063da1741 # v2.7.2 + uses: uraimo/run-on-arch-action@5397f9e30a9b62422f302092631c99ae1effcd9e # v2.8.1 with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} diff --git a/.github/workflows/build_vagrant.yml b/.github/workflows/build_vagrant.yml index 24f65df25b..62ece89520 100644 --- a/.github/workflows/build_vagrant.yml +++ b/.github/workflows/build_vagrant.yml @@ -19,18 +19,18 @@ permissions: jobs: build-solaris: name: Solaris - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # As Solaris Needs An Older Version Of Ansible/Python # Use Python2 & Pip To Install On Ubuntu 22.04 # Rather Than The System Packages - + - name: Install Python 2 run: sudo apt-get install python2 - + - name: Python 2 Get Pip Bootstrap Script run: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py @@ -40,18 +40,27 @@ jobs: - name: Install Ansible Using PIP2 run: pip2 install ansible - - name: Update Repos - run: sudo apt-get update - - name: Install VirtualBox run: sudo apt-get install virtualbox + - name: Add Hashicorp GPG Key + run: wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + + - name: Add Hashicorp Repository + run: echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + + - name: Update Repos + run: sudo apt-get update + - name: Install Vagrant run: sudo apt-get install vagrant + - name: Add User To VBOX group + run: sudo usermod -a -G vboxusers $USER + - name: Cache Solaris10.box id: solaris-10-cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: Solaris10.box key: sol10boxcache @@ -87,7 +96,7 @@ jobs: # Copy the machine's ssh key for the VMs to use, after removing prior files ssh-keygen -q -f $PWD/id_rsa -t rsa -N '' vagrant plugin install vagrant-vbguest - vagrant up + vagrant up --provider=virtualbox vagrantPORT=$(vagrant port | grep host | awk '{ print $4 }') rm -f playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx echo "[127.0.0.1]:${vagrantPORT}" >> playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx diff --git a/.github/workflows/build_wsl.yml b/.github/workflows/build_wsl.yml index 2e81b342fe..d9ff4ecb3c 100644 --- a/.github/workflows/build_wsl.yml +++ b/.github/workflows/build_wsl.yml @@ -29,21 +29,29 @@ jobs: name: Windows runs-on: ${{ matrix.os }} steps: - - - name: Setup WinRM and Password + - name: Setup WinRM and Password (checksum verified) shell: powershell run: | Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "Ansible_password123!" -Force) New-NetFirewallRule -DisplayName "ALLOW TCP PORT 5986" -Direction inbound -Profile Any -Action Allow -LocalPort 5986 -Protocol TCP Invoke-WebRequest https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\ConfigureRemotingForAnsible.ps1 - .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 - .\ConfigureRemotingForAnsible.ps1 -EnableCredSSP - .\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert - .\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck + $expectedChecksum = "EBA72DF06E3E77709595F75D1D5B4D95B06602429DD2A3F7867406DF875B0C70" + $actualChecksum = Get-FileHash -Path ".\ConfigureRemotingForAnsible.ps1" -Algorithm SHA256 | Select-Object -ExpandProperty Hash + if ($actualChecksum -ne $expectedChecksum) { + Write-Output "Checksum mismatch" + Write-Output "Actual Checksum: $actualChecksum" + Write-Output "Expect Checksum: $expectedChecksum" + exit 1 + } else { + .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 + .\ConfigureRemotingForAnsible.ps1 -EnableCredSSP + .\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert + .\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck + } - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: Vampire/setup-wsl@6f87de3102a29ac6b92800f33bf1e8d9164ac0a1 # v3.1.1 + - uses: Vampire/setup-wsl@23f94bc31caaddc08bd1230a00b89f872633d8d7 # v3.1.3 - name: Install dependencies run: | diff --git a/.github/workflows/check_dockerstatic.yml b/.github/workflows/check_dockerstatic.yml index 4b395db53b..bd4c85c458 100644 --- a/.github/workflows/check_dockerstatic.yml +++ b/.github/workflows/check_dockerstatic.yml @@ -25,10 +25,10 @@ jobs: max-parallel: 4 matrix: include: - - os: alpine3.19 - dockerfile: "Dockerfile.alp319" + - os: alpine3.20 + dockerfile: "Dockerfile.alp320" steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -44,8 +44,10 @@ jobs: include: - os: centos8 dockerfile: "Dockerfile.cent8" + - os: centos-stream-9 + dockerfile: "Dockerfile.centstream9" steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -59,10 +61,10 @@ jobs: max-parallel: 4 matrix: include: - - os: fedora39 - dockerfile: "Dockerfile.f39" + - os: fedora41 + dockerfile: "Dockerfile.f41" steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -76,14 +78,14 @@ jobs: max-parallel: 4 matrix: include: - - os: ubuntu18.04 - dockerfile: "Dockerfile.u1804" - os: ubuntu20.04 dockerfile: "Dockerfile.u2004" - os: ubuntu22.04 dockerfile: "Dockerfile.u2204" + - os: ubuntu24.04 + dockerfile: "Dockerfile.u2404" steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 9dd639924a..57d36d40a9 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: 'Yamllint' uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1 @@ -39,10 +39,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python 3.x - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: '3.x' diff --git a/.github/workflows/packer.yml b/.github/workflows/packer.yml index 406387fed8..e6ccca122b 100644 --- a/.github/workflows/packer.yml +++ b/.github/workflows/packer.yml @@ -18,7 +18,7 @@ jobs: matrix: os: [sonoma-arm64, sonoma-intel] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # This is to fix an issue with the github macos14 runner, that cant resolve keyserver.ubuntu.com # but this does work when replaced with the IP address. Spotted during the GPG verification of ANT step diff --git a/ONBOARDING.md b/ONBOARDING.md index 5d6ff8b9ae..5a2f72b708 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -18,13 +18,13 @@ Add the user to the correct Infrastructure team: - [@adoptopenjdk-infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/adoptopenjdk-infrastructure) - Can be assigned Infra Issues - [@jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins) - Super users on Jenkins -### [Secrets](https://github.com/AdoptOpenJDK/secrets) +### [Secrets](https://github.com/adoptium/secrets) For [@admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) and [@infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) teams only. - Show user how to access the secrets repo and also how to use dotGPG to read files. -- Adding a new user to dotGPG can be done following the instructions [here](https://github.com/AdoptOpenJDK/secrets#adding-users.) +- Adding a new user to dotGPG can be done following the instructions [here](https://github.com/adoptium/secrets#adding-users.) ## External Services diff --git a/README.md b/README.md index 73e204e295..8d06dc8df8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ See our current [Chaos Monkey Status](CHAOS_MONKEY.md). ## Related Repositories -* [secrets](https://www.github.com/adoptopenjdk/secrets/) - A private repo containing encrypted secrets. +* [secrets](https://www.github.com/adoptium/secrets/) - A private repo containing encrypted secrets. * [openjdk-jenkins-helper](https://www.github.com/adoptopenjdk/openjdk-jenkins-helper/) - A repo containing helper scripts for out Jenkins CI. ## Important Documentation diff --git a/ansible/DockerInventory.json b/ansible/DockerInventory.json index d8a93812bb..be50824aad 100644 --- a/ansible/DockerInventory.json +++ b/ansible/DockerInventory.json @@ -15,6 +15,10 @@ "nodeName": "test-docker-alpine320-x64-1", "port": "32784" }, + { + "nodeName": "test-docker-centos7-x64-1", + "port": "No port" + }, { "nodeName": "test-docker-fedora39-x64-2", "port": "32779" @@ -40,7 +44,7 @@ "port": "32782" } ], - "containersCount": 9 + "containersCount": 10 }, { "name": "dockerhost-azure-ubuntu2404-x64-1", @@ -97,6 +101,12 @@ ], "containersCount": 12 }, + { + "name": "dockerhost-azure-win2022-x64-1", + "ip": "No ip", + "containers": [], + "containersCount": 0 + }, { "name": "dockerhost-equinix-ubuntu2204-armv8-1", "ip": "139.178.86.243", @@ -232,7 +242,7 @@ "containersCount": 15 }, { - "name": "dockerhost-marist-ubuntu2204-s390x-1", + "name": "dockerhost-marist-ubuntu2404-s390x-1", "ip": "148.100.74.237", "containers": [ { @@ -255,7 +265,18 @@ "containersCount": 4 }, { - "name": "dockerhost-osuosl-ubuntu2004-ppc64le-1", + "name": "dockerhost-osuosl-ubuntu2404-aarch64-1", + "ip": "140.211.167.67", + "containers": [ + { + "nodeName": "test-docker-ubuntu2404-armv7-1", + "port": "32000" + } + ], + "containersCount": 1 + }, + { + "name": "dockerhost-osuosl-ubuntu2404-ppc64le-1", "ip": "140.211.168.214", "containers": [ { @@ -277,17 +298,6 @@ ], "containersCount": 4 }, - { - "name": "dockerhost-osuosl-ubuntu2404-aarch64-1", - "ip": "140.211.167.67", - "containers": [ - { - "nodeName": "test-docker-ubuntu2404-armv7-1", - "port": "32000" - } - ], - "containersCount": 1 - }, { "name": "dockerhost-skytap-ubuntu2004-ppc64le-1", "ip": "20.61.136.212", diff --git a/ansible/docker/Dockerfile.Alpine3 b/ansible/docker/Dockerfile.Alpine3 index fa5ab579e9..cb9f235aad 100644 --- a/ansible/docker/Dockerfile.Alpine3 +++ b/ansible/docker/Dockerfile.Alpine3 @@ -18,12 +18,12 @@ RUN set -eux; \ ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \ JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \ - JDK10_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ JDK14_BOOT_DIR="/usr/lib/jvm/zulu14" \ JDK15_BOOT_DIR="/usr/lib/jvm/zulu15" \ JDK16_BOOT_DIR="/usr/lib/jvm/zulu16" \ - JDK17_BOOT_DIR="/usr/lib/jvm/jdk-17" \ + JDK17_BOOT_DIR="/usr/lib/jvm/jdk17" \ JDK18_BOOT_DIR="/usr/lib/jvm/zulu18" \ JDKLATEST_BOOT_DIR="/usr/lib/jvm/zulu18" \ JAVA_HOME="/usr/lib/jvm/jdk8" diff --git a/ansible/docker/Dockerfile.CentOS6 b/ansible/docker/Dockerfile.CentOS6 index 49f2274cde..73b87b09d8 100644 --- a/ansible/docker/Dockerfile.CentOS6 +++ b/ansible/docker/Dockerfile.CentOS6 @@ -27,9 +27,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user} ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk.x86_64" \ JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk.x86_64" \ - JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \ - JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \ - JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \ + JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \ + JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \ JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk.x86_64" diff --git a/ansible/docker/Dockerfile.CentOS7 b/ansible/docker/Dockerfile.CentOS7 index 5f430918c6..c6c684d6b5 100644 --- a/ansible/docker/Dockerfile.CentOS7 +++ b/ansible/docker/Dockerfile.CentOS7 @@ -33,9 +33,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user} ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk" \ JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk" \ - JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \ - JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \ - JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \ + JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \ + JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \ JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" diff --git a/ansible/docker/Dockerfile.Ubuntu1604 b/ansible/docker/Dockerfile.Ubuntu1604 index 0a299053d1..a2a2a7f6a5 100644 --- a/ansible/docker/Dockerfile.Ubuntu1604 +++ b/ansible/docker/Dockerfile.Ubuntu1604 @@ -33,9 +33,9 @@ RUN mv /bin/uname /bin/uname.real && echo "/bin/uname.real \$@ | sed 's/aarch64/ ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \ JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \ - JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \ - JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \ - JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \ + JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \ + JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \ JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" diff --git a/ansible/docker/Dockerfile.Ubuntu2004-riscv64 b/ansible/docker/Dockerfile.Ubuntu2004-riscv64 index 72d9c3665d..21d7aff700 100644 --- a/ansible/docker/Dockerfile.Ubuntu2004-riscv64 +++ b/ansible/docker/Dockerfile.Ubuntu2004-riscv64 @@ -20,8 +20,8 @@ RUN groupadd -g 1000 ${user} RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user} ENV \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK17_BOOT_DIR="/usr/lib/jvm/jdk-17" \ - JDK19_BOOT_DIR="/usr/lib/jvm/jdk-19" \ - JDK21_BOOT_DIR="/usr/lib/jvm/jdk-21" \ - JAVA_HOME="/usr/lib/jvm/jdk-11" + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK17_BOOT_DIR="/usr/lib/jvm/jdk17" \ + JDK19_BOOT_DIR="/usr/lib/jvm/jdk19" \ + JDK21_BOOT_DIR="/usr/lib/jvm/jdk21" \ + JAVA_HOME="/usr/lib/jvm/jdk11" diff --git a/ansible/docker/Dockerfile.Ubuntu2204 b/ansible/docker/Dockerfile.Ubuntu2204 index a256077f70..a7135b1b2d 100644 --- a/ansible/docker/Dockerfile.Ubuntu2204 +++ b/ansible/docker/Dockerfile.Ubuntu2204 @@ -22,9 +22,9 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user} ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \ JDK8_BOOT_DIR="/usr/lib/jvm/jdk8" \ - JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \ - JDK11_BOOT_DIR="/usr/lib/jvm/jdk-11" \ - JDK13_BOOT_DIR="/usr/lib/jvm/jdk-13" \ - JDK14_BOOT_DIR="/usr/lib/jvm/jdk-14" \ - JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk-14" \ + JDK10_BOOT_DIR="/usr/lib/jvm/jdk10" \ + JDK11_BOOT_DIR="/usr/lib/jvm/jdk11" \ + JDK13_BOOT_DIR="/usr/lib/jvm/jdk13" \ + JDK14_BOOT_DIR="/usr/lib/jvm/jdk14" \ + JDKLATEST_BOOT_DIR="/usr/lib/jvm/jdk14" \ JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" diff --git a/ansible/docker/Dockerfile.win2022 b/ansible/docker/Dockerfile.win2022 index 94f4b6e628..3674a2f145 100644 --- a/ansible/docker/Dockerfile.win2022 +++ b/ansible/docker/Dockerfile.win2022 @@ -3,17 +3,41 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022 # Specify this with --build-arg PW=SomePassword ARG PW=T3mp=Passwd +# Download Cygwin Bootstrapper & Verify Its Checksum +RUN powershell -Command \ + "wget -UseBasicParsing https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe; \ + $expectedChecksum = 'e7815d360ab098fdd1f03f10f43f363c73a632e8866e304c72573cf1e6a0dec8'; \ + $fileChecksum = CertUtil -hashfile setup-x86_64.exe SHA256 | Select-String -Pattern '([A-Fa-f0-9]{64})' | ForEach-Object { $_.Matches[0].Groups[1].Value }; \ + if ($fileChecksum -ne $expectedChecksum) { \ + Write-Host 'Checksum verification failed!' -ForegroundColor Red; \ + Remove-Item setup-x86_64.exe; \ + exit 1; \ + } else { \ + Write-Host 'Checksum verification succeeded!' -ForegroundColor Green; \ + }" + # Set up cygwin with git and ansible as a bootstrap, and add to system default path -RUN powershell wget -UseBasicParsing https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe & \ - 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 & \ +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 & \ C:\cygwin64\bin\git config --system core.autocrlf false & \ del setup-x86_64.exe & \ setx PATH "c:\cygwin64\bin;%PATH%" & \ mkdir c:\temp +# Download Ansible Config Script & Verify Its Checksum +RUN powershell -Command \ + "wget https://raw.githubusercontent.com/ansible/ansible/dd4c56e4d68664e4a50292aa19ea61b15c92287c/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile ConfigureRemotingForAnsible.ps1; \ + $expectedChecksum = '201ad16584f79292044dc21c78c6688dce07f94d769f5e69631b46c3c13036fc'; \ + $fileChecksum = CertUtil -hashfile ConfigureRemotingForAnsible.ps1 SHA256 | Select-String -Pattern '([A-Fa-f0-9]{64})' | ForEach-Object { $_.Matches[0].Groups[1].Value }; \ + if ($fileChecksum -ne $expectedChecksum) { \ + Write-Host 'Checksum verification failed!' -ForegroundColor Red; \ + Remove-Item ConfigureRemotingForAnsible.ps1; \ + exit 1; \ + } else { \ + Write-Host 'Checksum verification succeeded!' -ForegroundColor Green; \ + }" + # Set up WinRM for the ansible connection -RUN powershell wget -UseBasicParsing https://raw.githubusercontent.com/ansible/ansible/dd4c56e4d68664e4a50292aa19ea61b15c92287c/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile ConfigureRemotingForAnsible.ps1 & \ - PowerShell .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 & \ +RUN PowerShell .\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999 & \ PowerShell .\ConfigureRemotingForAnsible.ps1 -EnableCredSSP & \ PowerShell .\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert & \ PowerShell .\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck diff --git a/ansible/inventory.yml b/ansible/inventory.yml index cf9d82d23a..4469c91916 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -15,16 +15,10 @@ hosts: ubuntu2204-x64-1: {ip: 172.187.163.163, user: adoptopenjdk, description: infra-wazuh-server} ubuntu2204-x64-2: {ip: 20.90.182.165, description: trss.adoptium.net} ubuntu2204-x64-3: {ip: 172.187.93.97, description: awx.adoptium.net} - ubuntu2204-vagrant-x64-1: {ip: 172.203.178.157, description: VPC-Qemu-1} - ubuntu2204-vagrant-x64-2: {ip: 48.217.96.46, description: VPC-Qemu-2} - digitalocean: ubuntu2004-x64-1: {ip: 178.62.115.224, description: bastillion.adoptopenjdk.net} - - equinix: - ubuntu1604-x64-1: {ip: 147.75.80.219, description: ansible.adoptopenjdk.net} - ubuntu2004-x64-1: {ip: 147.75.80.235, description: awx.adoptopenjdk.net} - - hetzner: ubuntu1604-x64-1: {ip: 78.47.239.96, description: nagios.adoptopenjdk.net} ubuntu2004-x64-1: {ip: 78.47.239.97, description: ci.adoptium.net} @@ -44,8 +38,6 @@ hosts: ubuntu1804-armv8-2: {ip: 159.138.100.163} - azure: - win2012r2-x64-1: {ip: 20.108.178.21, user: adoptopenjdk} - win2012r2-x64-2: {ip: 20.108.176.36, user: adoptopenjdk} win2022-x64-1: {ip: 172.187.129.163, user: adoptopenjdk} win2022-x64-2: {ip: 172.187.176.15, user: adoptopenjdk} win2022-x64-3: {ip: 51.142.8.47, user: adoptopenjdk} @@ -81,18 +73,17 @@ hosts: - azure: ubuntu2204-x64-1: {ip: 52.180.147.157, description: Xeon Platinum 8272CL, 16 cores, 64GB} - ubuntu2404-x64-1: {ip: 20.83.24.86, description: 16 cores, 64GB} - equinix: ubuntu2404-armv8-1: {ip: 147.75.35.203, description: Ampere Altra 160 core, 512Gb} ubuntu2204-armv8-1: {ip: 139.178.86.243, description: Ampere Altra 160 cores, 512Gb} - osuosl: - ubuntu2004-ppc64le-1: {ip: 140.211.168.214} + ubuntu2404-ppc64le-1: {ip: 140.211.168.214} ubuntu2404-aarch64-1: {ip: 140.211.167.67} - marist: - ubuntu2204-s390x-1: {ip: 148.100.74.237, user: linux1} + ubuntu2404-s390x-1: {ip: 148.100.74.237, user: linux1} - skytap: ubuntu2004-ppc64le-1: {ip: 20.61.136.212, description: 32CPU, 400G} @@ -110,6 +101,8 @@ hosts: win2019-x64-1: {ip: 13.92.177.186, user: adoptopenjdk} win2022-x64-1: {ip: 51.132.234.42, user: adoptopenjdk} win2022-x64-2: {ip: 20.26.116.218, user: adoptopenjdk} + win2022-x64-3: {ip: 20.68.165.213, user: adoptopenjdk} + win2022-x64-4: {ip: 20.77.112.43, user: adoptopenjdk} win11-aarch64-1: {ip: 20.4.31.184, user: adoptopenjdk} win11-aarch64-2: {ip: 108.143.205.79, user: adoptopenjdk} diff --git a/ansible/pbTestScripts/buildJDK.sh b/ansible/pbTestScripts/buildJDK.sh index 0ca8a291e5..5eb3c4a1b6 100755 --- a/ansible/pbTestScripts/buildJDK.sh +++ b/ansible/pbTestScripts/buildJDK.sh @@ -47,7 +47,6 @@ processArgs() { usage() { echo "Usage: ./buildJDK.sh - Options: --version | -v Specify the JDK version to build --fork | -f Specify the fork of openjdk-build to build from (Default: adoptopenjdk) @@ -55,7 +54,6 @@ usage() { --hotspot | -hs Builds hotspot, default is openj9 --clean-workspace | -c Removes old openjdk-build folder before cloning --help | -h Shows this message - If not specified, JDK8-J9 will be built with the standard openjdk-build repo" echo } @@ -92,7 +90,7 @@ findJDK7() { if [[ $jdkPath == "" ]]; then jdkPath="/usr/lib/jvm/jdk8" fi - + export JDK7_BOOT_DIR=$jdkPath } @@ -165,7 +163,7 @@ if [[ "$(uname -m)" == "armv7l" && "$VARIANT" == "openj9" ]]; then fi if [[ "$JAVA_TO_BUILD" == "jdk8u" ]]; then - findJDK7 + findJDK7 fi # Don't build the debug-images as it takes too much space, and doesn't benefit VPC @@ -173,6 +171,11 @@ fi export CONFIGURE_ARGS="--with-native-debug-symbols=none" export BUILD_ARGS="--custom-cacerts false" +# For Ubuntu24.04 Support - Don't Use gcc-7 +if grep 'noble' /etc/*-release >/dev/null 2>&1; then + export BUILD_ARGS="--custom-cacerts false --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b03" +fi + echo "buildJDK.sh DEBUG: TARGET_OS=${TARGET_OS:-} ARCHITECTURE=${ARCHITECTURE:-} @@ -185,7 +188,8 @@ echo "buildJDK.sh DEBUG: BRANCH=$GIT_BRANCH:-} FILENAME=${FILENAME:-}" -cloneRepo +cloneRepo cd $WORKSPACE/openjdk-build +export BUILD_ARGS=--create-sbom build-farm/make-adopt-build-farm.sh diff --git a/ansible/pbTestScripts/buildJDKWin.sh b/ansible/pbTestScripts/buildJDKWin.sh index 7794b9b213..9a20f03502 100755 --- a/ansible/pbTestScripts/buildJDKWin.sh +++ b/ansible/pbTestScripts/buildJDKWin.sh @@ -131,4 +131,5 @@ echo "buildJDKWin.sh DEBUG: FILENAME=${FILENAME:-}" echo "Running $WORKSPACE/openjdk-build/build-farm/make-adopt-build-farm.sh" +export BUILD_ARGS=--create-sbom $WORKSPACE/openjdk-build/build-farm/make-adopt-build-farm.sh diff --git a/ansible/pbTestScripts/testJDK.sh b/ansible/pbTestScripts/testJDK.sh index 1cd339f9ab..b53530d09f 100755 --- a/ansible/pbTestScripts/testJDK.sh +++ b/ansible/pbTestScripts/testJDK.sh @@ -17,28 +17,31 @@ if [[ "$(uname)" == "SunOS" ]]; then export PATH="/usr/local/bin:/opt/csw/bin:${PATH}" fi +## Run The Smoke Tests To Ensure The JDK Build OK mkdir -p $HOME/testLocation [ ! -d $HOME/testLocation/aqa-tests ] && git clone https://github.com/adoptium/aqa-tests.git $HOME/testLocation/aqa-tests # cd to aqa-tests as required by https://github.com/adoptium/aqa-tests/issues/2691#issue-932959102 cd $HOME/testLocation/aqa-tests -$HOME/testLocation/aqa-tests/get.sh +$HOME/testLocation/aqa-tests/get.sh --vendor_repos https://github.com/adoptium/temurin-build --vendor_branches master --vendor_dirs /test/functional cd $HOME/testLocation/aqa-tests/TKG || exit 1 +export BUILD_LIST=functional/buildAndPackage +$MAKE_COMMAND compile +$MAKE_COMMAND _extended.functional -# Solaris runs a different test to Linux. -# See: https://adoptium.slack.com/archives/C53GHCXL4/p1641311568115100?thread_ts=1641296204.114900&cid=C53GHCXL4 -if [[ "$(uname)" == "SunOS" ]]; then - export BUILD_LIST=system - $MAKE_COMMAND compile - $MAKE_COMMAND _MachineInfo -else - # Runs this test to check for prerequisite perl modules - export BUILD_LIST=functional - $MAKE_COMMAND compile - $MAKE_COMMAND _MBCS_Tests_pref_ja_JP_linux_0 -fi +# Run a few subsets of OpenJDK Tests as a shakedown of the built JDK. +export BUILD_LIST=openjdk +$MAKE_COMMAND compile +$MAKE_COMMAND _hotspot_sanity_0 +$MAKE_COMMAND _jdk_math_0 + +# Run Some Additional Tests To Test The Playbooks Have Run Properly +export BUILD_LIST=functional +$MAKE_COMMAND compile +$MAKE_COMMAND _MBCS_Tests_pref_ja_JP_linux_0 +$MAKE_COMMAND _MBCS_Tests_formatter_ja_JP_linux_0 # Run SSL Client Tests Linux Only ( Not Solaris / FreeBSD ) -if [[ "$(uname)" == "FreeBSD" ]] || [["$(uname)" == "SunOS"]]; then +if [[ "$(uname)" == "FreeBSD" ]] || [[ "$(uname)" == "SunOS" ]]; then echo "Skipping SSL Tests As Not Supported" else export TESTJAVA=$TEST_JDK_HOME diff --git a/ansible/pbTestScripts/testJDKWin.sh b/ansible/pbTestScripts/testJDKWin.sh index 555089a2d8..2a577afc27 100755 --- a/ansible/pbTestScripts/testJDKWin.sh +++ b/ansible/pbTestScripts/testJDKWin.sh @@ -15,6 +15,9 @@ rm -rf /cygdrive/c/tmp/*-test-image export TEST_JDK_HOME=`ls -d c:/tmp/jdk*|grep -v "static"|grep -v "debug"|grep -v "jre"|grep -v "test-image"` echo TEST_JDK_HOME=$TEST_JDK_HOME +## Run The Same Tests As Test JDK for Linux +## Run The Smoke Tests To Ensure The JDK Build OK + cd /cygdrive/c/tmp if [ ! -d "testLocation" ]; then @@ -22,15 +25,27 @@ then mkdir testLocation fi cd testLocation -if [ ! -d "openjdk-tests" ]; -then - echo "Git cloning openjdk-tests" - git clone https://github.com/adoptopenjdk/openjdk-tests -fi -cd openjdk-tests +git clone https://github.com/adoptium/aqa-tests.git +pwd +ls -tr +cd aqa-tests +./get.sh --vendor_repos https://github.com/adoptium/temurin-build --vendor_branches master --vendor_dirs /test/functional +pwd +ls -ltr +cd TKG || exit 1 -./get.sh -T $HOME/testLocation/openjdk-tests -p x64_windows -cd TKG -export BUILD_LIST=system +## Run The Smoke Tests To Ensure The JDK Build OK +export BUILD_LIST=functional/buildAndPackage make compile -make _extended.system +make _extended.functional + +# Run a few subsets of OpenJDK Tests as a shakedown of the built JDK. +export BUILD_LIST=openjdk +make compile +make _hotspot_sanity_0 +make _jdk_math_0 + +# Run Some Additional Tests To Test The Playbooks Have Run Properly +export BUILD_LIST=functional +make _MBCS_Tests_pref_ja_windows_0 +make _MBCS_Tests_formatter_ja_windows_0 diff --git a/ansible/pbTestScripts/vagrantPlaybookCheck.sh b/ansible/pbTestScripts/vagrantPlaybookCheck.sh index 2844290854..63cf7bf352 100644 --- a/ansible/pbTestScripts/vagrantPlaybookCheck.sh +++ b/ansible/pbTestScripts/vagrantPlaybookCheck.sh @@ -284,8 +284,21 @@ startVMPlaybook() # Initialize the args variable with common arguments args="$verbosity -i playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx -u vagrant -b $sshargs --skip-tags adoptopenjdk,jenkins${skipFullSetup}" - # Run the ansible playbook with the constructed args - eval ansible-playbook $args "playbooks/AdoptOpenJDK_Unix_Playbook/main.yml" 2>&1 | tee "$WORKSPACE/adoptopenjdkPBTests/logFiles/$gitFork.$newGitBranch.$OS.log" + ## If CentOS6 Delegate Playbook Run To Vagrant Machine Itself For Compatibility + if [ "$OS" == "CentOS6" ]; then + # Replace Remote Hosts File With Local Version + # vagrant ssh --command "cd /vagrant && pwd && echo localhost ansible_connection=local > playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx" + echo "localhost ansible_connection=local" > playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx + # SSH into machine and run the ansible playbook with the constructed args + vagrant ssh --command "cd /vagrant && eval ansible-playbook $args playbooks/AdoptOpenJDK_Unix_Playbook/main.yml | tee /vagrant/ansible_playbook.log" + # Copy The Logfile To The Expected Destination + cp ansible_playbook.log "$WORKSPACE/adoptopenjdkPBTests/logFiles/$gitFork.$newGitBranch.$OS.log" + # Return The Temporary Hosts File To Orignal + echo "[127.0.0.1]:${vagrantPORT}" > playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx + else + # Run the ansible playbook with the constructed args + eval ansible-playbook $args "playbooks/AdoptOpenJDK_Unix_Playbook/main.yml" 2>&1 | tee "$WORKSPACE/adoptopenjdkPBTests/logFiles/$gitFork.$newGitBranch.$OS.log" + fi echo The playbook finished at : `date +%T` if ! grep -q 'unreachable=0.*failed=0' $pbLogPath; then @@ -293,7 +306,7 @@ startVMPlaybook() exit 1 fi - if [ "$OS" == "Solaris10" ]; then + if [ "$OS" == "Solaris10" ] || [ "$OS" == "CentOS6" ]; then # Remove IP from known_hosts as the playbook installs an # alternate sshd which regenerates the host key infra#2244 ssh-keygen -R $(cat playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx) diff --git a/ansible/pbTestScripts/vmDestroy.sh b/ansible/pbTestScripts/vmDestroy.sh index bc0762e511..d98f477ef7 100755 --- a/ansible/pbTestScripts/vmDestroy.sh +++ b/ansible/pbTestScripts/vmDestroy.sh @@ -49,6 +49,8 @@ checkOS() { osToDestroy="U21";; "Ubuntu2204" | "U22" | "u22" ) osToDestroy="U22";; + "Ubuntu2404" | "U24" | "u24" ) + osToDestroy="U24";; "CentOS6" | "centos6" | "C6" | "c6" ) osToDestroy="C6" ;; "CentOS7" | "centos7" | "C7" | "c7" ) @@ -59,6 +61,8 @@ checkOS() { osToDestroy="D8" ;; "Debian10" | "debian10" | "D10" | "d10" ) osToDestroy="D10" ;; + "Fedora40" | "fedora40" | "F40" | "f40" ) + osToDestroy="F40" ;; "FreeBSD12" | "freebsd12" | "F12" | "f12" ) osToDestroy="FBSD12" ;; "Solaris10" | "solaris10" | "Sol10" | "sol10" ) @@ -68,7 +72,7 @@ checkOS() { "Windows2022" | "Win2022" | "W22" | "w22" ) osToDestroy="W2022";; "all" ) - osToDestroy="U16 U18 U20 U21 U22 C6 C7 C8 D8 D10 FBSD12 Sol10 W2012 W2022" ;; + osToDestroy="U16 U18 U20 U21 U22 C6 C7 C8 D8 D10 F40 FBSD12 Sol10 W2012 W2022" ;; "") echo "No OS detected. Did you miss the '-o' option?" ; usage; exit 1;; *) echo "$OS is not a currently supported OS" ; listOS; exit 1; @@ -83,6 +87,7 @@ listOS() { - Ubuntu2004 - Ubuntu2104 - Ubuntu2204 + - Ubuntu2404 - CentOS6 - CentOS7 - CentOS8 diff --git a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/group_vars/all/main.yml b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/group_vars/all/main.yml index 1e839d38c3..291df0a903 100644 --- a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/group_vars/all/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/group_vars/all/main.yml @@ -45,6 +45,9 @@ Vendor_Playbook: /Vendor_Files/Vendor_Playbook/Vendor.yml Asian_Locales: Disabled Slack_Notification: Disabled +ant_version: 1.10.15 +ant_checksum: sha512:1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9 + key: - apache_ant: CE8075A251547BEE249BC151A2115AE15F6B8B72 # Stefan Bodewig + apache_ant: 0A123C1ED3F13A6A0140E166C71FB765CD9DE313 # Jaikiran Pai adoptium: 3B04D753C9050D9A5D343F39843C48A565F8F04B # Adoptium GPG Key (DEB/RPM Signing Key) diff --git a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/aixfs/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/aixfs/tasks/main.yml index 922958277a..04b7cc6595 100644 --- a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/aixfs/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/aixfs/tasks/main.yml @@ -14,7 +14,7 @@ - mount: /var size: 4 - mount: /tmp - size: 4 + size: 5 - mount: /admin size: 1 - mount: /opt diff --git a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/ant/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/ant/tasks/main.yml index 91990cd6fd..d704aca90f 100644 --- a/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/ant/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_AIX_Playbook/roles/ant/tasks/main.yml @@ -20,23 +20,23 @@ - name: Download Apache Ant get_url: - url: https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.9-bin.zip - dest: /tmp/apache-ant-1.9.9-bin.zip + url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip + dest: /tmp/apache-ant-{{ ant_version }}-bin.zip mode: 0440 timeout: 25 when: ant.stat.islnk is not defined - name: GPG Signature verification - script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-1.9.9-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.9-bin.zip.asc" -k {{ key.apache_ant }} + script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-{{ ant_version }}-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip.asc" -k {{ key.apache_ant }} when: ant.stat.islnk is not defined - name: Unarchive Ant unarchive: - src: /tmp/apache-ant-1.9.9-bin.zip + src: /tmp/apache-ant-{{ ant_version }}-bin.zip dest: /opt copy: False when: ant.stat.islnk is not defined - name: Create symlink for ant - file: src=/opt/apache-ant-1.9.9/bin/ant dest=/usr/bin/ant state=link + file: src=/opt/apache-ant-{{ ant_version }}/bin/ant dest=/usr/bin/ant state=link when: ant.stat.islnk is not defined diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/group_vars/all/adoptopenjdk_variables.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/group_vars/all/adoptopenjdk_variables.yml index 898e43685c..391bc29a1a 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/group_vars/all/adoptopenjdk_variables.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/group_vars/all/adoptopenjdk_variables.yml @@ -33,10 +33,14 @@ Vendor_Playbook: /Vendor_Files/Vendor_Playbook/Vendor.yml # Default BootJDK installed bootjdk: hotspot +# Version of Ant used +ant_version: 1.10.15 +ant_checksum: sha512:1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9 + # GPG Public Keys key: curl: 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 # Daniel Stenberg - apache_ant: CE8075A251547BEE249BC151A2115AE15F6B8B72 # Stefan Bodewig + apache_ant: 0A123C1ED3F13A6A0140E166C71FB765CD9DE313 # Jaikiran Pai apache_maven: B02137D875D833D9B23392ECAE5A7FB608A0221C # Robert Scholte autoconf: A7A16B4A2527436A # Eric Blake cmake: EC8FEF3A7BFB4EDA # Brad King diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml index 06073ba261..3c73b69aad 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml @@ -126,6 +126,7 @@ jdk_version: 17 when: - ansible_distribution != "Solaris" + - not (ansible_distribution == "Alpine" and ansible_architecture == "aarch64") tags: build_tools - role: adoptopenjdk_install # JDK21 Build Bootstrap jdk_version: 20 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Ant-Contrib/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Ant-Contrib/tasks/main.yml index 2e0898dd42..65ba633e6e 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Ant-Contrib/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Ant-Contrib/tasks/main.yml @@ -11,7 +11,7 @@ - name: Set ant_lib_dir variable for on {{ ansible_distribution }} {{ ansible_architecture }} set_fact: - ant_lib_dir: /usr/local/apache-ant-1.10.5/lib + ant_lib_dir: /usr/local/apache-ant-"{{ ant_version }}"/lib tags: ant-contrib - name: "Print ant_lib_dir variable" diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml index 60c7789130..d16cab0300 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Alpine.yml @@ -129,10 +129,10 @@ when: - not adoptopenjdk8_installed.stat.exists -# Temp: install a non temurin binary until GA or when the jdk-11 alpine aarch64 build job becomes more stable (whichever comes first) +# Temp: install a non temurin binary until GA or when the jdk11 alpine aarch64 build job becomes more stable (whichever comes first) # https://github.com/adoptium/temurin-build/issues/2961 - - name: Check if jdk-11 is already installed in the target location - stat: path=/usr/lib/jvm/jdk-11 + - name: Check if jdk11 is already installed in the target location + stat: path=/usr/lib/jvm/jdk11 register: adoptopenjdk11_installed - name: Install java 11 from Alpine repositories @@ -142,7 +142,7 @@ - name: Create symlink to point at openjdk11 file: src: /usr/lib/jvm/java-11-openjdk - dest: /usr/lib/jvm/jdk-11 + dest: /usr/lib/jvm/jdk11 state: link when: ansible_architecture != "aarch64" and not adoptopenjdk11_installed.stat.exists @@ -169,10 +169,10 @@ # Temp. Change to GA binary once theyre available - name: Check if Temurin jdk17 is installed stat: - path: /usr/lib/jvm/jdk-17 + path: /usr/lib/jvm/jdk17 register: adoptopenjdk17_installed - - name: Install Temurin jdk-17 nightly + - name: Install Temurin jdk17 nightly unarchive: src: https://github.com/adoptium/temurin17-binaries/releases/download/jdk17u-2022-05-27-19-32-beta/OpenJDK17U-jdk_aarch64_alpine-linux_hotspot_2022-05-27-17-01.tar.gz dest: /usr/lib/jvm @@ -184,7 +184,7 @@ when: - not adoptopenjdk17_installed.stat.exists - - name: Get Temurin jdk-17 full path name + - name: Get Temurin jdk17 full path name shell: set -o pipefail | ls -ld /usr/lib/jvm/jdk-17.* 2>/dev/null | awk '{print $9}' register: adoptopenjdk17_dir when: @@ -193,7 +193,7 @@ - name: Create symlink to major version file: src: '{{ adoptopenjdk17_dir.stdout }}' - dest: /usr/lib/jvm/jdk-17 + dest: /usr/lib/jvm/jdk17 state: link when: - not adoptopenjdk17_installed.stat.exists diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml index e81cb80544..1388f7393a 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Fedora.yml @@ -94,11 +94,11 @@ - (ansible_distribution_major_version == "8") tags: build_tools -- name: Install additional build tools for FEDORA 35 +- name: Install additional build tools for FEDORA 35+ package: "name={{ item }} state=latest" - with_items: "{{ Additional_Build_Tools_FEDORA35 }}" + with_items: "{{ Additional_Build_Tools_FEDORA35PLUS }}" when: - - (ansible_distribution_major_version == "35" and ansible_distribution == "Fedora") + - (ansible_distribution_major_version >= "35" and ansible_distribution == "Fedora") tags: build_tools ################# @@ -123,7 +123,7 @@ when: - not (ansible_distribution_major_version == "6" and ansible_architecture == "ppc64") - not (ansible_distribution_major_version == "8") - - not (ansible_distribution_major_version == "35" and ansible_distribution == "Fedora") + - not (ansible_distribution_major_version >= "35" and ansible_distribution == "Fedora") tags: install_java - name: Install Java when RedHat 6 on ppc64 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml index 3de6fa65a0..918fbadfc2 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml @@ -23,7 +23,8 @@ - name: Add Devel-Tools repository (SLES15) zypper_repository: - repo: https://download.opensuse.org/repositories/devel:/tools/15.5/devel:tools.repo + name: devel-tools + repo: 'https://download.opensuse.org/repositories/devel:/tools/15.{{ ansible_distribution_release }}/' auto_import_keys: yes state: present when: diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/Fedora.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/Fedora.yml index 795891fa5f..07cc36880a 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/Fedora.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/Fedora.yml @@ -31,7 +31,6 @@ Build_Tool_Packages: - gnutls-utils - libcurl-devel - libffi-devel - - libnss3.so - libpng-devel - libXext-devel - libXi-devel # JDK12+ compilation @@ -59,7 +58,7 @@ Additional_Build_Tools_NOT_RHEL8: - libmpc-devel # now in CodeReady Linux Builder (CRB) repo - ntp -Additional_Build_Tools_FEDORA35: +Additional_Build_Tools_FEDORA35PLUS: - glibc.i686 # a dependency required for executing a 32-bit C binary - glibc-devel.i686 # a dependency required for executing a 32-bit C binary - libstdc++.i686 # a dependency required for executing a 32-bit C binary @@ -137,7 +136,6 @@ Test_Tool_Packages: - mercurial - gnutls - gnutls-utils - - libnss3.so - shared-mime-info - nss-devel - nss-tools diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.al2023 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.al2023 index f255964830..438a552925 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.al2023 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.al2023 @@ -1,5 +1,8 @@ FROM amazonlinux:2023 +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + RUN dnf -y update && dnf install -y perl openssh-server unzip zip wget tar RUN dnf install -y --allowerasing gnupg2 RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -P "" @@ -10,15 +13,15 @@ RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843 RUN wget -q `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/21/ga?architecture=x64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=linux&page=0&page_size=1&project=jdk&vendor=eclipse' | grep signature_link | awk '{split($0,a,"\""); print a[4]}'` -O /tmp/jdk21.sig RUN gpg --verify /tmp/jdk21.sig /tmp/jdk21.tar.gz RUN mkdir -p /usr/lib/jvm/jdk21 && tar -xpzf /tmp/jdk21.tar.gz -C /usr/lib/jvm/jdk21 --strip-components=1 -# Install ant 1.10.12 -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.12-bin.zip' +# Install ant +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "7e6fbcc3563df4bd87c883ad86a161a71da2774e0ed71a1b3aad82cbff1a7656ed9a0acb5ce40652129376dfd79f1ef74ec3369c1067d412a63062fea62ceccd /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.12/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.12/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Clear up space RUN rm /tmp/jdk21.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk21.sig # Set up jenkins user diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.alp320 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.alp320 index 5d3fc7e977..713db3a2a6 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.alp320 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.alp320 @@ -1,5 +1,8 @@ FROM alpine:3.20 +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + RUN apk --update add bash shadow openssh-server openssh-client unzip zip wget git curl make gcc perl xvfb \ libxrender libxi libxtst procps musl-dev perl-doc alsa-lib libx11 msttcorefonts-installer fontconfig libxext freetype zlib fakeroot gnupg @@ -20,14 +23,14 @@ RUN gpg --verify /tmp/jdk21.sig /tmp/jdk21.tar.gz RUN mkdir -p /usr/lib/jvm/jdk21 && tar -xpzf /tmp/jdk21.tar.gz -C /usr/lib/jvm/jdk21 --strip-components=1 # Install ant and ant-contrib. -RUN wget -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.9-bin.zip' +RUN wget -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "d085f59349edf22a93d835aa30aea2521ed39bdb99d57d941f1ebd8d115a561bb28aecc781915ff2a0d9f7caf7bae536cdda0910bb432b2a4bce8b7b90c2903b /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum -c /tmp/ant.sha512 RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.9/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar -RUN ln -s /usr/local/apache-ant-1.10.9/bin/ant /usr/bin/ant +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant # Create user jenkins with random password. Prevents locked user account that makes SSH'ing into # the container impossible. diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.centstream9 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.centstream9 new file mode 100644 index 0000000000..8972045762 --- /dev/null +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.centstream9 @@ -0,0 +1,44 @@ +FROM quay.io/centos/centos:stream9 + +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + +RUN dnf -y update && dnf install -y perl openssh-server unzip zip wget epel-release +RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -P "" + +# Download JDK +RUN wget -q 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/aarch64/jdk/hotspot/normal/eclipse?project=jdk' -O /tmp/jdk17.tar.gz +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B +# Get sig file for latest jdk17 ga +RUN wget -q `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/17/ga?architecture=aarch64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=linux&page=0&page_size=1&project=jdk&vendor=eclipse' | grep signature_link | awk '{split($0,a,"\""); print a[4]}'` -O /tmp/jdk17.sig +RUN gpg --verify /tmp/jdk17.sig /tmp/jdk17.tar.gz +RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/jdk17 --strip-components=1 + +# Install Ant +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" +RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 +RUN sha512sum --check --strict /tmp/ant.sha512 +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant +RUN unzip -q -d /usr/local /tmp/ant.zip +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +# Clear up space +RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk17.sig /tmp/ant.sha512 + +# Set up jenkins user +RUN useradd -m -d /home/jenkins jenkins +RUN mkdir /home/jenkins/.ssh +RUN echo "Jenkins_User_SSHKey" > /home/jenkins/.ssh/authorized_keys +RUN chown -R jenkins /home/jenkins/.ssh +RUN chmod -R og-rwx /home/jenkins/.ssh +# RUN service ssh start +CMD ["/usr/sbin/sshd","-D"] + +RUN dnf install -y git make gcc xorg-x11-server-Xvfb libXrender libXi libXtst fontconfig fakeroot procps-ng hostname diffutils shared-mime-info +RUN dnf install -y coreutils --allowerasing curl +# Install SSL Test packages +RUN dnf install -y gnutls gnutls-utils nss nss-tools +# ENTRYPOINT /usr/lib/jvm/jdk17/bin/java +EXPOSE 22 +# Start with docker run -p 2222:22 UUID diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.deb12 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.deb12 index 3bfcf0e4b9..3135f3d9a2 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.deb12 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.deb12 @@ -1,4 +1,8 @@ FROM debian:12 + +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + # Install Base Requirements RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections RUN apt-get update && apt-get install -y perl openssh-server unzip zip wget apt-utils gnupg curl @@ -16,14 +20,14 @@ RUN gpg --verify /tmp/jdk17.sig /tmp/jdk17.tar.gz RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/jdk17 --strip-components=1 # Install ant via WGET -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.12-bin.zip' +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "7e6fbcc3563df4bd87c883ad86a161a71da2774e0ed71a1b3aad82cbff1a7656ed9a0acb5ce40652129376dfd79f1ef74ec3369c1067d412a63062fea62ceccd /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.12/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.12/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Housekeep Downloaded Archives RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk17.sig # Set up jenkins user diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.f41 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.f41 index 93d0361be5..a265954979 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.f41 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.f41 @@ -1,5 +1,8 @@ FROM fedora:41 +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + RUN yum -y update && yum install -y perl openssh-server unzip zip wget RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -P "" # Get latest jdk17 ga @@ -9,15 +12,15 @@ RUN wget -q `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/17/ga?architecture=x64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=linux&page=0&page_size=1&project=jdk&vendor=eclipse' | grep signature_link | awk '{split($0,a,"\""); print a[4]}'` -O /tmp/jdk17.sig RUN gpg --verify /tmp/jdk17.sig /tmp/jdk17.tar.gz RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/jdk17 --strip-components=1 -# Install ant 1.10.12 -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.12-bin.zip' +# Install ant +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "7e6fbcc3563df4bd87c883ad86a161a71da2774e0ed71a1b3aad82cbff1a7656ed9a0acb5ce40652129376dfd79f1ef74ec3369c1067d412a63062fea62ceccd /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.12/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.12/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Clear up space RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk17.sig # Set up jenkins user diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles12 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles12 index 64bcca423a..a6715b8e04 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles12 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles12 @@ -1,5 +1,8 @@ FROM registry.suse.com/suse/sles12sp5:latest +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + RUN zypper ar https://download.opensuse.org/distribution/leap/15.4/repo/oss/ sles15oss RUN zypper --gpg-auto-import-keys refresh RUN zypper update -y && zypper install -y wget perl openssh-server unzip zip tar gzip hostname @@ -9,14 +12,14 @@ RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/j RUN ln -s /usr/lib/jvm/jdk17/bin/java /usr/bin/java # Install ant -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip' +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tar.gz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "2e48f9e429d67708f5690bc307232f08440d01ebe414059292b6543971da9c7cd259c21533b9163b4dd753321c17bd917adf8407d03245a0945fc30a4e633163 /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tar.gz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.5/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tar.gz -C /usr/local/apache-ant-1.10.5/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tar.gz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Clear up space RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tar.gz diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles15 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles15 index 8204ee73f7..011a8f8d8f 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles15 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles15 @@ -1,5 +1,8 @@ FROM registry.suse.com/suse/sle15 +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + RUN zypper addrepo https://download.opensuse.org/distribution/leap/15.4/repo/oss/ "Main Repository" && zypper --gpg-auto-import-keys refresh RUN zypper update -y && zypper install -y perl openssh-server unzip zip wget tar gzip @@ -8,14 +11,14 @@ RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/j RUN ln -s /usr/lib/jvm/jdk17/bin/java /usr/bin/java # Install ant -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip' +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tar.gz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "2e48f9e429d67708f5690bc307232f08440d01ebe414059292b6543971da9c7cd259c21533b9163b4dd753321c17bd917adf8407d03245a0945fc30a4e633163 /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tar.gz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.5/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tar.gz -C /usr/local/apache-ant-1.10.5/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tar.gz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Clear up space RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tar.gz diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u2404 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u2404 index f3b190e0de..d68a99d522 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u2404 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u2404 @@ -3,6 +3,9 @@ FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -qq -y perl openssh-server unzip zip gnupg curl +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + # Get latest jdk17 ga RUN wget -q 'https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jdk/hotspot/normal/eclipse?project=jdk' -O /tmp/jdk17.tar.gz RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B @@ -12,14 +15,14 @@ RUN gpg --verify /tmp/jdk17.sig /tmp/jdk17.tar.gz RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/jdk17 --strip-components=1 # Install ant -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip' +RUN wget -q -O /tmp/ant.zip "https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip" RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "2e48f9e429d67708f5690bc307232f08440d01ebe414059292b6543971da9c7cd259c21533b9163b4dd753321c17bd917adf8407d03245a0945fc30a4e633163 /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.5/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.5/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Clear up space RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk17.sig diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.ubi9 b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.ubi9 index 5b7fa2f720..c96d53d48a 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.ubi9 +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.ubi9 @@ -1,4 +1,8 @@ FROM redhat/ubi9 + +ARG ant_version="1.10.15" +ARG ant_512checksum="1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9" + # Install Base Requirements RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm RUN dnf -y update && dnf install -y perl openssh-server unzip zip wget epel-release @@ -28,14 +32,14 @@ RUN wget -q `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/17/ga? RUN gpg --verify /tmp/jdk17.sig /tmp/jdk17.tar.gz RUN mkdir -p /usr/lib/jvm/jdk17 && tar -xpzf /tmp/jdk17.tar.gz -C /usr/lib/jvm/jdk17 --strip-components=1 # Install ant via WGET -RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip' +RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.zip' RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz -RUN echo "2e48f9e429d67708f5690bc307232f08440d01ebe414059292b6543971da9c7cd259c21533b9163b4dd753321c17bd917adf8407d03245a0945fc30a4e633163 /tmp/ant.zip" > /tmp/ant.sha512 +RUN echo "$ant_512checksum /tmp/ant.zip" > /tmp/ant.sha512 RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512 RUN sha512sum --check --strict /tmp/ant.sha512 -RUN ln -s /usr/local/apache-ant-1.10.5/bin/ant /usr/bin/ant +RUN ln -s /usr/local/apache-ant-$ant_version/bin/ant /usr/bin/ant RUN unzip -q -d /usr/local /tmp/ant.zip -RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.5/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar +RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-$ant_version/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar # Housekeep Downloaded Archives RUN rm /tmp/jdk17.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/gpgkey.rpm /tmp/jdk17.sig # Set up jenkins user diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/scripts/updateDockerStaticInventory.py b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/scripts/updateDockerStaticInventory.py index ab580a6ab6..45b6d480cf 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/scripts/updateDockerStaticInventory.py +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/scripts/updateDockerStaticInventory.py @@ -69,9 +69,9 @@ def main(): for node in nodes: try: nodeConfig = server.get_node_config(node["name"]) - nodeIP = getIP(nodeConfig) nodePort = getNodePort(nodeConfig) - if nodeIP == dockerhost["ip"] and node["name"] != dockerhost["name"]: + nodeLabel = getLabel(nodeConfig) + if nodeLabel.find(dockerhost["name"]) > -1: nodeObject = {"nodeName": node["name"], "port": nodePort} containers.append(nodeObject) except jenkins.NotFoundException: diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Get_Vendor_Files/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Get_Vendor_Files/tasks/main.yml index 663da4ee18..6bb73ad394 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Get_Vendor_Files/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Get_Vendor_Files/tasks/main.yml @@ -9,8 +9,8 @@ delegate_to: localhost run_once: true -- name: Check out AdoptOpenJDK/secrets - git: repo=git@github.com:AdoptOpenJDK/secrets.git dest=vendor_files force=true +- name: Check out adoptium/secrets + git: repo=git@github.com:adoptium/secrets.git dest=vendor_files force=true delegate_to: localhost when: - not local_vendor_files.stat.exists diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/additional_plugins/check_docker_overlay2_size.sh b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/additional_plugins/check_docker_overlay2_size.sh new file mode 100644 index 0000000000..3293aa96e3 --- /dev/null +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/additional_plugins/check_docker_overlay2_size.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Nagios plugin to check the size of /var/lib/docker/overlay2 +# Allows passing thresholds as parameters + +# Default thresholds (in GB) +DEFAULT_WARN_THRESHOLD=20 +DEFAULT_CRIT_THRESHOLD=40 + +# Folder to check +TARGET_DIR="/var/lib/docker/overlay2/" + +# Function to display usage +usage() { + echo "Usage: $0 -w -c " + echo " -w: Warning threshold in GB (default: $DEFAULT_WARN_THRESHOLD)" + echo " -c: Critical threshold in GB (default: $DEFAULT_CRIT_THRESHOLD)" + exit 3 +} + +# Parse command-line arguments +while getopts "w:c:" opt; do + case $opt in + w) WARN_THRESHOLD=$OPTARG ;; + c) CRIT_THRESHOLD=$OPTARG ;; + *) usage ;; + esac +done + +# Set default thresholds if not provided +WARN_THRESHOLD=${WARN_THRESHOLD:-$DEFAULT_WARN_THRESHOLD} +CRIT_THRESHOLD=${CRIT_THRESHOLD:-$DEFAULT_CRIT_THRESHOLD} + +# Convert GB to bytes +WARN_THRESHOLD_BYTES=$((WARN_THRESHOLD * 1024 * 1024 * 1024)) +CRIT_THRESHOLD_BYTES=$((CRIT_THRESHOLD * 1024 * 1024 * 1024)) + +# Check if the directory exists +if [[ ! -d "$TARGET_DIR" ]]; then + echo "CRITICAL: Directory $TARGET_DIR does not exist." + exit 2 +fi + +# Get the size of the folder in bytes +FOLDER_SIZE_BYTES=$(du -sb "$TARGET_DIR" 2>/dev/null | awk '{print $1}') + +# Handle error if du fails +if [[ -z "$FOLDER_SIZE_BYTES" ]]; then + echo "CRITICAL: Failed to determine the size of $TARGET_DIR." + exit 2 +fi + +# Convert size to GB for display +FOLDER_SIZE_GB=$(echo "scale=2; $FOLDER_SIZE_BYTES / (1024 * 1024 * 1024)" | bc) + +# Determine Nagios status +if (( FOLDER_SIZE_BYTES > CRIT_THRESHOLD_BYTES )); then + echo "CRITICAL: $TARGET_DIR size is ${FOLDER_SIZE_GB}GB (Threshold: >${CRIT_THRESHOLD}GB)" + exit 2 +elif (( FOLDER_SIZE_BYTES > WARN_THRESHOLD_BYTES )); then + echo "WARNING: $TARGET_DIR size is ${FOLDER_SIZE_GB}GB (Threshold: >${WARN_THRESHOLD}GB)" + exit 1 +else + echo "OK: $TARGET_DIR size is ${FOLDER_SIZE_GB}GB (Threshold: <=${WARN_THRESHOLD}GB)" + exit 0 +fi diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/main.yml index ba6be0fbc8..13c7552c50 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/main.yml @@ -107,3 +107,9 @@ src: roles/Nagios_Plugins/tasks/additional_plugins/check_container_spaces.sh dest: /usr/local/nagios/libexec/check_container_spaces.sh mode: 0755 + +- name: Copy Docker Overlay2 Size Plugin + copy: + src: roles/Nagios_Plugins/tasks/additional_plugins/check_docker_overlay2_size.sh + dest: /usr/local/nagios/libexec/check_docker_overlay2_size.sh + mode: 0755 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml index f4ab2c0791..cfc60fb35e 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml @@ -33,7 +33,7 @@ - name: Set path variable when jdk_version != 8 set_fact: - path: /usr/lib/jvm/jdk-{{ jdk_version }} + path: /usr/lib/jvm/jdk{{ jdk_version }} when: - jdk_version != 8 - ansible_distribution != "MacOSX" @@ -41,7 +41,7 @@ - name: Set path variable (macOS) set_fact: - path: "/Library/Java/JavaVirtualMachines/jdk-{{ jdk_version }}" + path: "/Library/Java/JavaVirtualMachines/jdk{{ jdk_version }}" when: ansible_distribution == "MacOSX" tags: adoptopenjdk_install @@ -136,7 +136,7 @@ - not usr_lib_jvm_exists.stat.exists tags: adoptopenjdk_install -- name: Check if jdk-{{ jdk_version }} is already installed in the target location +- name: Check if jdk{{ jdk_version }} is already installed in the target location shell: ls -ld {{ path }} >/dev/null 2>&1 failed_when: false register: adoptopenjdk_installed @@ -356,17 +356,21 @@ until: adoptopenjdk_unpack is not failed - name: Get {{ path }}* full path name - shell: set -o pipefail | ls -ld {{ path }}* 2>/dev/null | awk '{print $9}' - register: adoptopenjdk_dir - changed_when: false + find: + paths: /usr/lib/jvm + patterns: + - "^jdk{{ jdk_version }}*" + - "^jdk-{{ jdk_version }}.*" + use_regex: yes + file_type: directory when: - ansible_distribution != "MacOSX" - adoptopenjdk_installed.rc != 0 - tags: adoptopenjdk_install + register: adoptopenjdk_dir - name: Create symlink to major version file: - src: '{{ adoptopenjdk_dir.stdout }}' + src: '{{ adoptopenjdk_dir.files[0].path }}' dest: '{{ path }}' state: link when: @@ -376,7 +380,7 @@ - name: Chown {{ path }}* file: - path: '{{ adoptopenjdk_dir.stdout }}' + path: '{{ adoptopenjdk_dir.files[0].path }}' state: directory owner: root recurse: yes diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml index 30322a1e69..f8a4e981a9 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/ant/tasks/main.yml @@ -4,9 +4,10 @@ ############## # Install Apache Ant from binaries on RHEL and Centos +# ant_version and ant_checksum are set in group_vars/adoptopenjdk_variables.yml - name: Check if Apache Ant is already installed in custom location /usr/local - shell: ls /usr/local/apache-ant-1.10.5 >/dev/null 2>&1 + shell: ls /usr/local/apache-ant-{{ ant_version }} >/dev/null 2>&1 failed_when: false register: ant_installed changed_when: false @@ -16,12 +17,12 @@ - name: Download Apache Ant binaries get_url: - url: https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip + url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip dest: /tmp/ mode: 0440 timeout: 25 validate_certs: no - checksum: sha512:2e48f9e429d67708f5690bc307232f08440d01ebe414059292b6543971da9c7cd259c21533b9163b4dd753321c17bd917adf8407d03245a0945fc30a4e633163 + checksum: "{{ ant_checksum }}" when: - ant_installed.rc != 0 - ansible_distribution != "MacOSX" @@ -29,7 +30,7 @@ tags: ant - name: Download Apache Ant binaries (macOS) and (Solaris) - command: wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip -O /tmp/apache-ant-1.10.5-bin.zip + command: wget https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip -O /tmp/apache-ant-{{ ant_version }}-bin.zip when: - ant_installed.rc != 0 - ansible_distribution == "MacOSX" or ansible_distribution == "Solaris" @@ -44,14 +45,14 @@ tags: ant - name: GPG Signature verification - script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-1.10.5-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip.asc" -k {{ key.apache_ant }} + script: ../Supporting_Scripts/package_signature_verification.sh -f /tmp/apache-ant-{{ ant_version }}-bin.zip -sl "https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip.asc" -k {{ key.apache_ant }} when: ant_installed.rc != 0 tags: ant - name: Extract ant become: true unarchive: - src: /tmp/apache-ant-1.10.5-bin.zip + src: /tmp/apache-ant-{{ ant_version }}-bin.zip dest: /usr/local copy: false when: @@ -69,7 +70,7 @@ - name: Create /usr/local/bin/ant symlink become: true file: - src: /usr/local/apache-ant-1.10.5/bin/ant + src: /usr/local/apache-ant-{{ ant_version }}/bin/ant dest: /usr/local/bin/ant state: link when: @@ -81,7 +82,7 @@ path: "{{ item }}" state: absent with_items: - - /tmp/apache-ant-1.10.5-bin.zip + - /tmp/apache-ant-{{ ant_version }}-bin.zip when: - ant_installed.rc != 0 failed_when: false diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/jckservices_iptables/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/jckservices_iptables/tasks/main.yml index cca70e54df..ac1f6e2c1d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/jckservices_iptables/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/jckservices_iptables/tasks/main.yml @@ -72,7 +72,7 @@ - 207.254.73.168 # gn324-macos11-x86_64 - 207.254.28.13 # esmv4-macos11-arm64 - 207.254.28.99 # noh7B-macos12-arm64 - - 20.234.51.61 # jck-azure-ubuntu2204-x64-1 + - 52.142.50.166 # jck-azure-ubuntu2204-x64-1 - 172.178.96.199 # jck-ubuntu-2204-solaris10 - 62.210.163.131 # jck-rise-ubuntu2404-risc64-1 - 62.210.163.164 # jck-rise-ubuntu2404-risc64-2 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml index 9e234bb3df..e091847940 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml @@ -11,6 +11,11 @@ # If so, nasm_installed.rc will equal 0, then check if its the version required # If not, download, compile and install +- name: Set NASM version + set_fact: + nasm_version: "2.16.03" + tags: nasm + # checking the common location for ubuntu package installs - name: Checking for /usr/bin/gcc-7 stat: path=/usr/bin/gcc-7 @@ -71,35 +76,50 @@ tags: nasm - name: Download nasm sources - shell: cd /tmp && wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.gz + shell: cd /tmp && wget https://www.nasm.us/pub/nasm/releasebuilds/{{ nasm_version }}/nasm-{{ nasm_version }}.tar.gz when: - - (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) + - (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) ) tags: nasm - name: Extract nasm sources unarchive: - src: /tmp/nasm-2.13.03.tar.gz + src: /tmp/nasm-{{ nasm_version }}.tar.gz dest: /tmp/ copy: False when: - (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) tags: nasm -- name: Running ./configure & make for nasm ( Not Ubuntu 22+ ) - shell: cd /tmp/nasm-2.13.03 && CC={{ CC }} && ./configure -prefix=/usr/local && make install +- name: Running ./configure & make for nasm ( Not Ubuntu 22+ and not Fedora 35+ ) + shell: cd /tmp/nasm-{{ nasm_version }} && CC={{ CC }} && ./configure -prefix=/usr/local && make install environment: CC: "{{ CC }}" when: - - (ansible_distribution != "Ubuntu" or ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "22") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) + - (ansible_distribution != "Ubuntu" or (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int < 22 )) + - (ansible_distribution != "Fedora" or (ansible_distribution == "Fedora" and ansible_distribution_major_version | int < 35 )) + - (nasm_installed.rc is defined) + - (nasm_installed.rc != 0 or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne'))) tags: nasm -- name: Running ./configure & make for nasm ( Ubuntu 22+ x64 ) - shell: cd /tmp/nasm-2.13.03 && CC={{ CC }} && ./configure -prefix=/usr/local && make install +- name: Running ./configure & make for nasm ( Ubuntu 22 x64 ) + shell: cd /tmp/nasm-{{ nasm_version }} && CC={{ CC }} && ./configure -prefix=/usr/local && make install environment: CC: "{{ CC }}" LIBRARY_PATH: /usr/lib/x86_64-linux-gnu when: - - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version >= "22" and ansible_architecture == "x86_64") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) + - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 22 and ansible_architecture == "x86_64") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) ) + tags: nasm + +- name: Running ./configure & make for nasm ( Ubuntu 24+ x64 / Fedora 35+) + shell: cd /tmp/nasm-{{ nasm_version }} && ./configure -prefix=/usr/local && make install + environment: + LIBRARY_PATH: /usr/lib/x86_64-linux-gnu + when: + - ansible_architecture == "x86_64" + - nasm_installed.rc is defined + - (nasm_installed.rc != 0) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) + - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int >= 24) + or (ansible_distribution == "Fedora" and ansible_distribution_major_version | int >= 35) tags: nasm - name: Remove downloaded packages for nasm @@ -107,7 +127,7 @@ path: "{{ item }}" state: absent with_items: - - /tmp/nasm-2.13.03 - - /tmp/nasm-2.13.03.tar.gz + - /tmp/nasm-{{ nasm_version }} + - /tmp/nasm-{{ nasm_version }}.tar.gz failed_when: false tags: nasm diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/group_vars/all/adoptopenjdk_variables.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/group_vars/all/adoptopenjdk_variables.yml index d7a78593d1..2cc3a19e6d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/group_vars/all/adoptopenjdk_variables.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/group_vars/all/adoptopenjdk_variables.yml @@ -16,9 +16,12 @@ Nagios_Plugins: Disabled bootjdk: hotspot heapsize: normal +ant_version: 1.10.15 +ant_checksum: 1de7facbc9874fa4e5a2f045d5c659f64e0b89318c1dbc8acc6aae4595c4ffaf90a7b1ffb57f958dd08d6e086d3fff07aa90e50c77342a0aa5c9b4c36bff03a9 + ## Nagios Server Details Nagios_Master_IP: 78.47.239.96 # GPG Public Keys key: - apache_ant: CE8075A251547BEE249BC151A2115AE15F6B8B72 # Stefan Bodewig + apache_ant: 0A123C1ED3F13A6A0140E166C71FB765CD9DE313 # Jaikiran Pai diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml index 60274091d0..78d07893e6 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/main.yml @@ -76,6 +76,8 @@ tags: MSVS_2019 - role: MSVS_2022 tags: MSVS_2022 + - role: MSVS_2022_REDIST + tags: MSVS_2022_REDIST - NVidia_Cuda_Toolkit # OpenJ9 - NTP_TIME - Clang_64bit # OpenJ9 @@ -85,6 +87,7 @@ - IcedTea-Web # For Jenkins webstart - WiX # For creating installers - NSClient # Required For Nagios Monitoring + - Incredibuild # Configure Incredibuild Dashboard Service - shortNames - Dragonwell # Dragonwell bootstrap image - role: Jenkins_Service_Installation # Automate installing the jenkins service diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/ANT/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/ANT/tasks/main.yml index 9f45339f85..42affc1265 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/ANT/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/ANT/tasks/main.yml @@ -3,9 +3,9 @@ # Apache ANT Installation # ########################### -- name: Test if Ant is already installed +- name: Test if Ant {{ ant_version }} is already installed win_stat: - path: 'C:\apache-ant\apache-ant-1.10.5' + path: 'C:\apache-ant\apache-ant-{{ ant_version }}' register: ant_installed tags: ANT @@ -17,11 +17,11 @@ - name: Download Apache ANT win_get_url: - url: https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip + url: https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip dest: c:\temp\ant.zip force: no - checksum: 9028e2fc64491cca0f991acc09b06ee7fe644afe41d1d6caf72702ca25c4613c - checksum_algorithm: sha256 + checksum: "{{ ant_checksum }}" + checksum_algorithm: sha512 when: (not ant_installed.stat.exists) and (not ant_download.stat.exists) register: ant_download tags: ANT @@ -31,7 +31,7 @@ file: ../../GPG_signature_verification/tasks/main.yml vars: file_path: c:/temp/ant.zip - signature_link: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip.asc" + signature_link: "https://archive.apache.org/dist/ant/binaries/apache-ant-{{ ant_version }}-bin.zip.asc" GPG_key: "{{ key.apache_ant }}" when: (not ant_installed.stat.exists) tags: ANT @@ -45,7 +45,7 @@ tags: ANT - name: Set ANT_HOME - raw: setx ANT_HOME "C:\apache-ant\apache-ant-1.10.5" /m + raw: setx ANT_HOME "C:\apache-ant\apache-ant-{{ ant_version }}" /m when: (not ant_installed.stat.exists) tags: ANT @@ -59,7 +59,7 @@ - name: Test if ant-contrib is already installed win_stat: - path: 'C:\apache-ant\apache-ant-1.10.5\lib\ant-contrib.jar' + path: 'C:\apache-ant\apache-ant-{{ ant_version }}\lib\ant-contrib.jar' register: ant_contrib_installed tags: ANT @@ -84,7 +84,7 @@ - name: Copy the ant-contrib.jar to ANT's lib folder win_copy: src: C:\temp\ant-contrib\ant-contrib\lib\ant-contrib.jar - dest: C:\apache-ant\apache-ant-1.10.5\lib\ant-contrib.jar + dest: C:\apache-ant\apache-ant-{{ ant_version }}\lib\ant-contrib.jar remote_src: True when: (not ant_contrib_installed.stat.exists) tags: ANT diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Get_Vendor_Files/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Get_Vendor_Files/tasks/main.yml index c346b710d1..f452fb13f0 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Get_Vendor_Files/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Get_Vendor_Files/tasks/main.yml @@ -9,8 +9,8 @@ delegate_to: localhost run_once: true -- name: Check out AdoptOpenJDK/secrets - git: repo=git@github.com:AdoptOpenJDK/secrets.git dest=vendor_files force=true +- name: Check out adoptium/secrets + git: repo=git@github.com:adoptium/secrets.git dest=vendor_files force=true delegate_to: localhost when: - not local_vendor_files.stat.exists diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml new file mode 100644 index 0000000000..598e006981 --- /dev/null +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -0,0 +1,34 @@ +--- +####################################### +# Incredibuild - Configuration Tasks # +####################################### + +- name: Check if the ibxbuild service exists + ansible.windows.win_service_info: + name: IBXDashboard + register: service_info + +- name: Stop the IBX Dashboard service if it exists + ansible.windows.win_service: + name: IBXDashboard + state: stopped + when: service_info.exists + +- name: Check if incredibuild.conf file exists + win_stat: + path: 'C:\Program Files (x86)\IncrediBuild\Dashboard\Apache24\conf\incredibuild.conf' + register: incredibuild_conf_file + +- name: Replace APACHE_PORT in incredibuild.conf if file exists + win_lineinfile: + path: 'C:\Program Files (x86)\IncrediBuild\Dashboard\Apache24\conf\incredibuild.conf' + regexp: '^define APACHE_PORT \d+$' + line: 'define APACHE_PORT 31000' + backup: yes + when: incredibuild_conf_file.stat.exists + +- name: Start the IBX Dashboard service if it exists + ansible.windows.win_service: + name: IBXDashboard + state: started + when: service_info.exists diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml new file mode 100644 index 0000000000..ff4805b2e3 --- /dev/null +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml @@ -0,0 +1,56 @@ +--- +########################################### +# Visual Studio 2022 Redists Installation # +########################################### +- name: Set Windows SDK version + set_fact: + wsdk_version: "14.40.33807_10.0.26100.0" + tags: MSVS_2022_REDIST + +- name: Set Windows SDK checksum + set_fact: + wsdk_checksum: "a29ada15d941a7b2065e9a4273fd6b97df44d089ed2b9f860ded442f7fe69767" + tags: MSVS_2022_REDIST + +- name: Test if VS 2022 Redists Are installed + win_stat: + path: 'c:\openjdk\devkit\vs2022_redist_{{ wsdk_version }}' + register: vs2022sdk_installed + tags: MSVS_2022_REDIST + +- name: Check if C:\openjdk\devkit exists + ansible.windows.win_stat: + path: 'c:\openjdk\devkit' + register: directory_status + tags: MSVS_2022_REDIST + +- name: Create C:\openjdk\devkit if it does not exist + ansible.windows.win_file: + path: 'c:\openjdk\devkit\' + state: directory + when: not directory_status.stat.exists + tags: MSVS_2022_REDIST + +# Download & Install VS2022 Redists From Github + +- name: Download Visual Studio 2022 Redists + win_get_url: + url: 'https://github.com/adoptium/devkit-binaries/releases/download/vs2022_redist_14.40.33807_10.0.26100.0/vs2022_redist_14.40.33807_10.0.26100.0.zip' + checksum: "{{ wsdk_checksum }}" + checksum_algorithm: sha256 + dest: 'c:\openjdk\devkit\vs2022_redist_{{ wsdk_version }}.zip' + force: no + tags: MSVS_2022_REDIST + +- name: Unzip Visual Studio 2022 Redists + win_unzip: + src: 'c:\openjdk\devkit\vs2022_redist_{{ wsdk_version }}.zip' + dest: 'c:\openjdk\devkit\vs2022_redist_{{ wsdk_version }}' + when: not vs2022sdk_installed.stat.exists + tags: MSVS_2022_REDIST + +- name: Remove VS2022 redists Download + win_file: + path: 'c:\openjdk\devkit\vs2022_redist_{{ wsdk_version }}.zip' + state: absent + tags: MSVS_2022_REDIST diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks/main.yml index fdde87f728..2c129f8a0e 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks/main.yml @@ -12,7 +12,11 @@ win_get_url: url: https://cygwin.com/setup-x86_64.exe dest: C:\temp\cygwin.exe + force: no + checksum: e7815d360ab098fdd1f03f10f43f363c73a632e8866e304c72573cf1e6a0dec8 + checksum_algorithm: sha256 when: not cygwin_installed.stat.exists + register: cygwin_download tags: cygwin # If you update this with a new package, modify the "Test diff --git a/ansible/vagrant/Vagrantfile.Fedora40 b/ansible/vagrant/Vagrantfile.Fedora40 new file mode 100644 index 0000000000..2cc45cc060 --- /dev/null +++ b/ansible/vagrant/Vagrantfile.Fedora40 @@ -0,0 +1,30 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +$script = <