From 5d5064fbad8bddafeda1a2305931453c670d5937 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Mon, 19 Feb 2024 11:05:11 +0000 Subject: [PATCH 1/4] github: fix yaml linter Signed-off-by: Stewart X Addison --- .github/workflows/build.yml | 23 ++++----- .github/workflows/build_mac.yml | 7 +-- .github/workflows/build_qemu.yml | 7 +-- .github/workflows/build_vagrant.yml | 9 ++-- .github/workflows/build_wsl.yml | 7 +-- .github/workflows/check_dockerstatic.yml | 59 ++++++++++++------------ .github/workflows/code-freeze.yml | 3 +- .github/workflows/labeler.yml | 17 +++---- .github/workflows/linter.yml | 15 +++--- 9 files changed, 78 insertions(+), 69 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b74dbb3895..e53e3e1cd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,20 +1,21 @@ -name: Docker +-- +name: Create docker build container images on: pull_request: paths: - - .github/workflows/build.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** - - ansible/docker/** + - .github/workflows/build.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** + - ansible/docker/** branches: - - master + - master push: paths: - - .github/workflows/build.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** - - ansible/docker/** + - .github/workflows/build.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** + - ansible/docker/** branches: - - master + - master permissions: contents: read @@ -25,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Set up Docker Buildx to use cache feature uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 @@ -65,7 +66,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Set up Docker Buildx to use cache feature uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 8720ba7998..ce28cd92f8 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -1,12 +1,13 @@ +--- name: Ansible Playbook on: pull_request: paths: - - .github/workflows/build_mac.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** + - .github/workflows/build_mac.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** branches: - - master + - master permissions: contents: read diff --git a/.github/workflows/build_qemu.yml b/.github/workflows/build_qemu.yml index c4df6ab2e5..6adb9d9e5b 100644 --- a/.github/workflows/build_qemu.yml +++ b/.github/workflows/build_qemu.yml @@ -1,12 +1,13 @@ +--- name: QEMU Playbook Checker on: pull_request: paths: - - .github/workflows/build_qemu.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** + - .github/workflows/build_qemu.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** branches: - - master + - master types: [ labeled ] permissions: diff --git a/.github/workflows/build_vagrant.yml b/.github/workflows/build_vagrant.yml index 8e3b12ceab..da5346dc98 100644 --- a/.github/workflows/build_vagrant.yml +++ b/.github/workflows/build_vagrant.yml @@ -1,12 +1,13 @@ +--- name: Vagrant Playbook Checker on: pull_request: paths: - - .github/workflows/build_vagrant.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** + - .github/workflows/build_vagrant.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/** branches: - - master + - master # Cancel existing runs if user makes another push. concurrency: @@ -22,7 +23,7 @@ jobs: runs-on: macos-12 steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Install dependencies run: | diff --git a/.github/workflows/build_wsl.yml b/.github/workflows/build_wsl.yml index d9b688c015..daaa21c8ae 100644 --- a/.github/workflows/build_wsl.yml +++ b/.github/workflows/build_wsl.yml @@ -1,3 +1,4 @@ +--- name: Windows Playbook Checker defaults: @@ -7,10 +8,10 @@ defaults: on: pull_request: paths: - - .github/workflows/build_wsl.yml - - ansible/playbooks/AdoptOpenJDK_Windows_Playbook/** + - .github/workflows/build_wsl.yml + - ansible/playbooks/AdoptOpenJDK_Windows_Playbook/** branches: - - master + - master # Cancel existing runs if user makes another push. concurrency: diff --git a/.github/workflows/check_dockerstatic.yml b/.github/workflows/check_dockerstatic.yml index aa00f711d7..876764b21e 100644 --- a/.github/workflows/check_dockerstatic.yml +++ b/.github/workflows/check_dockerstatic.yml @@ -1,3 +1,4 @@ +--- # GH action workflow to check ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/* # trigger on PR towards 'master' branch when files in ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic changed @@ -6,10 +7,10 @@ name: DockerStatic Checker on: pull_request: paths: - - .github/workflows/check_dockerstatic.yml - - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/** + - .github/workflows/check_dockerstatic.yml + - ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/** branches: - - master + - master env: ROOT_PATH: "ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/" @@ -24,17 +25,17 @@ jobs: fail-fast: true max-parallel: 4 matrix: - include: - - os: alpine13.1 - dockerfile: "Dockerfile.alp311" - - os: alpine13.2 - dockerfile: "Dockerfile.alp312" - - os: alpine13.3 - dockerfile: "Dockerfile.alp313" - - os: alpine13.4 - dockerfile: "Dockerfile.alp314" + include: + - os: alpine13.1 + dockerfile: "Dockerfile.alp311" + - os: alpine13.2 + dockerfile: "Dockerfile.alp312" + - os: alpine13.3 + dockerfile: "Dockerfile.alp313" + - os: alpine13.4 + dockerfile: "Dockerfile.alp314" steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -51,7 +52,7 @@ jobs: - os: centos8 dockerfile: "Dockerfile.cent8" steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -64,15 +65,15 @@ jobs: fail-fast: true max-parallel: 4 matrix: - include: - - os: fedora33 - dockerfile: "Dockerfile.f33" - - os: fedora34 - dockerfile: "Dockerfile.f34" - - os: fedora35 - dockerfile: "Dockerfile.f35" + include: + - os: fedora33 + dockerfile: "Dockerfile.f33" + - os: fedora34 + dockerfile: "Dockerfile.f34" + - os: fedora35 + dockerfile: "Dockerfile.f35" steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Test Dockerfile on ${{ matrix.os }} env: DOCKERFILE: ${{ matrix.dockerfile }} @@ -85,13 +86,13 @@ jobs: fail-fast: true max-parallel: 4 matrix: - include: - - os: ubuntu16.04 - dockerfile: "Dockerfile.u1604" - - os: ubuntu18.04 - dockerfile: "Dockerfile.u1804" - - os: ubuntu20.04 - dockerfile: "Dockerfile.u2004" + include: + - os: ubuntu16.04 + dockerfile: "Dockerfile.u1604" + - os: ubuntu18.04 + dockerfile: "Dockerfile.u1804" + - os: ubuntu20.04 + dockerfile: "Dockerfile.u2004" steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Test Dockerfile on ${{ matrix.os }} diff --git a/.github/workflows/code-freeze.yml b/.github/workflows/code-freeze.yml index 83ffd2746c..ed0f7ed3e2 100644 --- a/.github/workflows/code-freeze.yml +++ b/.github/workflows/code-freeze.yml @@ -1,9 +1,10 @@ +--- name: Code Freeze Bot # Controls when the workflow will run on: pull_request_target: - branches: [ "master" ] + branches: ["master"] issue_comment: types: [created] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b32d3a518f..4f082205c4 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,3 +1,4 @@ +--- # Label adding bot, see .github/labeler.yml for config name: "Pull Request Labeler" @@ -10,12 +11,12 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 # v4.0.2 - if: ${{ github.event.pull_request }} - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + - uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 # v4.0.2 + if: ${{ github.event.pull_request }} + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" - - uses: fuxingloh/multi-labeler@fb9bc28b2d65e406ffd208384c5095793c3fd59a # v1.8.0 - with: - github-token: "${{secrets.GITHUB_TOKEN}}" - config-path: .github/regex_labeler.yml + - uses: fuxingloh/multi-labeler@fb9bc28b2d65e406ffd208384c5095793c3fd59a # v1.8.0 + with: + github-token: "${{secrets.GITHUB_TOKEN}}" + config-path: .github/regex_labeler.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 4c51a72abb..9ea612341e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,17 +1,18 @@ +--- name: Linter on: pull_request: paths: - - ansible/** - - .ansible-lint + - ansible/** + - .ansible-lint branches: - - master + - master push: paths: - - ansible/** + - ansible/** branches: - - master + - master permissions: contents: read @@ -25,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: 'Yamllint' uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1 @@ -39,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - name: Set up Python 3.x uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3 From 75902685df93210b5350b2c977da19bc73b3db15 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Mon, 19 Feb 2024 11:25:21 +0000 Subject: [PATCH 2/4] fix linter conditions Signed-off-by: Stewart X Addison --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 9ea612341e..54f1ade1a3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,6 +6,7 @@ on: paths: - ansible/** - .ansible-lint + - .github/workflows/* branches: - master push: From dbc14aa7234045df7c12c9ad530ecd77c359d87a Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Mon, 19 Feb 2024 12:42:47 +0000 Subject: [PATCH 3/4] Fudge Signed-off-by: Stewart X Addison --- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml index fe976ced42..b6402a8823 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml @@ -148,3 +148,4 @@ - role: logs position: "End" tags: always +# FUDGE TO TRIGGER THE LINTER From f42e0547017804654cb84561a67162375b719fce Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Thu, 15 Feb 2024 16:44:23 +0000 Subject: [PATCH 4/4] docker: allow ubuntu 22 dockerfile to work on aarch64 Signed-off-by: Stewart X Addison --- ansible/docker/Dockerfile.Ubuntu2204 | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/docker/Dockerfile.Ubuntu2204 b/ansible/docker/Dockerfile.Ubuntu2204 index 9bda531717..a256077f70 100644 --- a/ansible/docker/Dockerfile.Ubuntu2204 +++ b/ansible/docker/Dockerfile.Ubuntu2204 @@ -18,7 +18,6 @@ RUN rm -rf /ansible RUN groupadd -g 1000 ${user} RUN useradd -c "Jenkins user" -d /home/${user} -u 1000 -g 1000 -m ${user} -RUN mv /bin/uname /bin/uname.real && echo "/bin/uname.real \$@ | sed 's/aarch64/armv7l/g'" > /bin/uname && chmod 755 /bin/uname ENV \ JDK7_BOOT_DIR="/usr/lib/jvm/jdk8" \