Skip to content

Commit

Permalink
Merge branch 'master' into dockerstatic.inventoryfile
Browse files Browse the repository at this point in the history
  • Loading branch information
karianna committed Apr 25, 2024
2 parents 1628e9b + 2a029fd commit 07dada6
Show file tree
Hide file tree
Showing 51 changed files with 241 additions and 974 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Expand Up @@ -25,21 +25,21 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Set up Docker Buildx to use cache feature
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
if: github.ref == 'refs/heads/master'


- name: Docker Build CentOS6 Image Test
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: ./ansible/docker/Dockerfile.CentOS6
build-args: git_sha=${{ github.sha }}
Expand All @@ -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@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: ./ansible/docker/Dockerfile.CentOS6
build-args: git_sha=${{ github.sha }}
Expand All @@ -65,13 +65,13 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Set up Docker Buildx to use cache feature
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Docker Build Alpine3 Image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: ./ansible/docker/Dockerfile.Alpine3
build-args: git_sha=${{ github.sha }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_mac.yml
Expand Up @@ -19,10 +19,10 @@ jobs:
matrix:
include:
- os: [macos-11]
- os: [macos-13]
- os: [macos-14]
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Install dependencies
run: brew install ansible
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_qemu.yml
Expand Up @@ -36,10 +36,10 @@ jobs:
# distro: jessie

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Run on architecture
uses: uraimo/run-on-arch-action@517085f0367c8256bcfa753e3e13e1550af09954 # v2.7.1
uses: uraimo/run-on-arch-action@b0ffb25eb00af00468375982384441f063da1741 # v2.7.2
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_vagrant.yml
Expand Up @@ -22,8 +22,11 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Update Repos
run: sudo apt-get update

- name: Install Ansible
run: sudo apt-get install ansible

Expand All @@ -35,7 +38,7 @@ jobs:

- name: Cache Solaris10.box
id: solaris-10-cache
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: Solaris10.box
key: sol10boxcache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wsl.yml
Expand Up @@ -41,7 +41,7 @@ jobs:
.\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
.\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- uses: Vampire/setup-wsl@d4e837996638afd047e7b468de70e28fe76cf75a # v3.0.0

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check_dockerstatic.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
- os: alpine3.19
dockerfile: "Dockerfile.alp319"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Test Dockerfile on ${{ matrix.os }}
env:
DOCKERFILE: ${{ matrix.dockerfile }}
Expand All @@ -45,7 +45,7 @@ jobs:
- os: centos8
dockerfile: "Dockerfile.cent8"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Test Dockerfile on ${{ matrix.os }}
env:
DOCKERFILE: ${{ matrix.dockerfile }}
Expand All @@ -62,7 +62,7 @@ jobs:
- os: fedora39
dockerfile: "Dockerfile.f39"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Test Dockerfile on ${{ matrix.os }}
env:
DOCKERFILE: ${{ matrix.dockerfile }}
Expand All @@ -83,7 +83,7 @@ jobs:
- os: ubuntu22.04
dockerfile: "Dockerfile.u2204"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Test Dockerfile on ${{ matrix.os }}
env:
DOCKERFILE: ${{ matrix.dockerfile }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linter.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: 'Yamllint'
uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1
Expand All @@ -39,10 +39,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Set up Python 3.x
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep_diff.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
# Step 1: Clone application source code
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0

Expand Down
28 changes: 22 additions & 6 deletions FAQ.md
Expand Up @@ -85,16 +85,30 @@ have at the moment:
| Dockerfile | Image | Platforms | Where is this built? | In use?
|---|---|---|---|---|
| [Centos7](./ansible/docker/Dockerfile.CentOS7) | [`adoptopenjdk/centos7_build_image`](https://hub.docker.com/r/adoptopenjdk/centos7_build_image) | linux on amd64, arm64, ppc64le | [Jenkins](https://ci.adoptium.net/job/centos7_docker_image_updater/) | Yes
| [RHEL7](./ansible/docker/Dockerfile.RHEL7) | n/a - restricted (*) | s390x | [Jenkins](https://ci.adoptium.net/job/rhel7_docker_image_updater/) | Yes
| [Centos6](./ansible/docker/Dockerfile.CentOS6) | [`adoptopenjdk/centos6_build_image`](https://hub.docker.com/r/adoptopenjdk/centos6_build_image)| linux/amd64 | [GH Actions](.github/workflows/build.yml) | Yes
| [Alpine3](./ansible/docker/Dockerfile.Alpine3) | [`adoptopenjdk/alpine3_build_image`](https://hub.docker.com/r/adoptopenjdk/alpine3_build_image) | linux/x64 & linux/arm64 | [Jenkins](https://ci.adoptium.net/job/centos7_docker_image_updater/) | Yes
| [Ubuntu 20.04 (riscv64 only)](./ansible/docker/Dockerfile.Ubuntu2004-riscv64) | [`adoptopenjdk/ubuntu2004_build_image:linux-riscv64`](https://hub.docker.com/r/adoptopenjdk/ubuntu2004_build_image) | linux/riscv64 | [Jenkins](https://ci.adoptium.net/job/centos7_docker_image_updater/) | Yes

<details>
<summary>(*) - Caveats:</summary>

The RHEL7 image creation for s390x has to be run on a RHEL host using a
container implementation supplied by Red Hat, and we are using RHEL8 for
this as it has a stable implemention. The image creation requires the
following:

1. The host needs to have an active RHEL subscription
2. The RHEL7 devkit (which cannot be made public) to be available in a tar file under /usr/local on the host as per the name in the Dockerfile
</details>

When a change lands into master, the relevant dockerfiles are built using
the appropriate CI system listed in the table above by configuring them with
the ansible playbooks and pushing them up to Docker Hub where they can be
consumed by our jenkins build agents when the `DOCKER_IMAGE` value is
defined on the jenkins build pipelines as configured in the
[pipeline_config files](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations).
the ansible playbooks and - with the exception of the RHEL7 image for s390x -
pushing them up to Docker Hub where they can be consumed by our jenkins
build agents when the `DOCKER_IMAGE` value is defined on the jenkins build
pipelines as configured in the [pipeline_config
files](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations).

### Adding a new dockerBuild dockerhub repository

Expand Down Expand Up @@ -208,8 +222,10 @@ is more information on running tests yourself in the

A few examples that test specific pieces of infra-related functionality so useful to be aware of.
These are the parameters to pass into a Grinder job in jenkins. If using
these from the command line as per the example above, the `TARGET` name
should have an underscore `_` prepended to it.
these from the command line instead of a Grinder job there are a couple of
things regarding the information in this table:
- The `TARGET` name should have an underscore `_` prepended to it (like the shell snippet above)
- For custom targets, specify it as a JDK_CUSTOM_TARGET variable to make e.g. `make _jdk_custom JDK_CUSTOM_TARGET=java/lang/invoke/lambda/LambdaFileEncodingSerialization.java`

| `BUILD_LIST` | `TARGET` | `CUSTOM_TARGET` | What does it test? |
| --- | --- | --- | --- |
Expand Down
15 changes: 7 additions & 8 deletions ansible/docker/Dockerfile.RHEL7
@@ -1,10 +1,5 @@
FROM registry.access.redhat.com/rhel7
# This dockerfile should be built using this from the top level of the repository:
# ROSIPW=******* docker build --no-cache -t rhel7_build_image -f ansible/docker/Dockerfile.RHEL7 --build-arg ROSIUSER=******* --secret id=ROSIPW --build-arg git_sha="$(git rev-parse --short HEAD)" `pwd`
ARG ROSIUSER
RUN sed -i 's/\(def in_container():\)/\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py
RUN --mount=type=secret,id=ROSIPW,required=true subscription-manager register --username=${ROSIUSER} --password="$(cat /run/secrets/ROSIPW)" --auto-attach
RUN subscription-manager repos --enable rhel-7-for-system-z-optional-rpms
RUN yum-config-manager --enable rhel-7-for-system-z-optional-rpms
# ^^ Optional repo needed for Xvfb

ARG git_sha
Expand All @@ -15,6 +10,7 @@ RUN yum --enablerepo=rhel-7-server-ansible-2-for-system-z-rpms install -y ansibl
RUN yum clean all

COPY . /ansible
COPY devkit /usr/local/devkit

RUN echo "localhost ansible_connection=local" > /ansible/hosts

Expand All @@ -31,7 +27,10 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1002 -g 1003 -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" \
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
RUN subscription-manager unregister

# While this does bloat the image it is required for building the
# devkit, and the process for that runs as non-root ...
# Disabled for now as we're going to copy from /usr/local/devkit on the host
RUN yum clean all
RUN yum reinstall --downloadonly glibc glibc-headers glibc-devel cups-libs cups-devel libX11 libX11-devel xorg-x11-proto-devel alsa-lib alsa-lib-devel libXext libXext-devel libXtst libXtst-devel libXrender libXrender-devel libXrandr libXrandr-devel freetype freetype-devel libXt libXt-devel libSM libSM-devel libICE libICE-devel libXi libXi-devel libXdmcp libXdmcp-devel libXau libXau-devel libgcc libxcrypt zlib zlib-devel libffi libffi-devel fontconfig fontconfig-devel kernel-headers
12 changes: 2 additions & 10 deletions ansible/inventory.yml
Expand Up @@ -70,13 +70,8 @@ hosts:
solaris10u11-sparcv9-1: {ip: cloud.siteox.com, port: 24322}

- ibmcloud:
win2012r2-x64-1: {ip: 169.48.4.138, user: Administrator}
win2012r2-x64-2: {ip: 169.48.4.142, user: Administrator}
win2022-x64-1: {ip: 52.118.206.11, user: Administrator}

- spearhead:
freebsd12-x64-1: {ip: 185.131.222.224}

- docker:

- skytap:
Expand All @@ -86,10 +81,9 @@ hosts:

- azure:
ubuntu2204-x64-1: {ip: 52.180.147.157, description: Xeon Platinum 8272CL, 16 cores, 64GB}
ubuntu2204-x64-2: {ip: 20.83.24.86, description: 16 cores, 64GB}

- equinix:
ubuntu2204-x64-1: {ip: 145.40.113.173, description: Intel Xeon Gold 40 core}
ubuntu2004-x64-1: {ip: 145.40.114.58, description: AMD EPYC 7401P 24 core}
ubuntu2004-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}

Expand All @@ -112,7 +106,7 @@ hosts:

- azure:
win2016-x64-1: {ip: 52.149.211.210, user: adoptopenjdk}
win2019-x64-1: {ip: 20.185.182.137, user: adoptopenjdk}
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}
win11-aarch64-1: {ip: 20.4.31.184, user: adoptopenjdk}
Expand Down Expand Up @@ -177,5 +171,3 @@ hosts:
rhel6-x64-1: {ip: 169.48.4.140}
rhel7-x64-1: {ip: 169.48.4.136}
ubuntu1604-x64-1: {ip: 169.48.4.141}
win2012r2-x64-1: {ip: 169.48.4.131, user: Administrator}
win2012r2-x64-2: {ip: 169.48.4.139, user: Administrator}
Expand Up @@ -19,6 +19,7 @@
- '11'
- '16'
- '17'
- '21'

- name: Set /usr/java8_64 as default
file:
Expand Down

0 comments on commit 07dada6

Please sign in to comment.