Skip to content

Commit 0b610c7

Browse files
authored
Merge branch 'master' into xcode_offline_role
2 parents aee9b91 + 31214c7 commit 0b610c7

File tree

9 files changed

+50
-36
lines changed

9 files changed

+50
-36
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2929

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

3333
- name: Login to Docker Hub
3434
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
@@ -68,7 +68,7 @@ jobs:
6868
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6969

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

7373
- name: Docker Build Alpine3 Image
7474
uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e # v5.2.0

FAQ.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,30 @@ have at the moment:
8585
| Dockerfile | Image | Platforms | Where is this built? | In use?
8686
|---|---|---|---|---|
8787
| [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
88+
| [RHEL7](./ansible/docker/Dockerfile.RHEL7) | n/a - restricted (*) | s390x | [Jenkins](https://ci.adoptium.net/job/rhel7_docker_image_updater/) | Yes
8889
| [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
8990
| [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
9091
| [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
9192

93+
<details>
94+
<summary>(*) - Caveats:</summary>
95+
96+
The RHEL7 image creation for s390x has to be run on a RHEL host using a
97+
container implementation supplied by Red Hat, and we are using RHEL8 for
98+
this as it has a stable implemention. The image creation requires the
99+
following:
100+
101+
1. The host needs to have an active RHEL subscription
102+
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
103+
</details>
104+
92105
When a change lands into master, the relevant dockerfiles are built using
93106
the appropriate CI system listed in the table above by configuring them with
94-
the ansible playbooks and pushing them up to Docker Hub where they can be
95-
consumed by our jenkins build agents when the `DOCKER_IMAGE` value is
96-
defined on the jenkins build pipelines as configured in the
97-
[pipeline_config files](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations).
107+
the ansible playbooks and - with the exception of the RHEL7 image for s390x -
108+
pushing them up to Docker Hub where they can be consumed by our jenkins
109+
build agents when the `DOCKER_IMAGE` value is defined on the jenkins build
110+
pipelines as configured in the [pipeline_config
111+
files](https://github.com/AdoptOpenJDK/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations).
98112

99113
### Adding a new dockerBuild dockerhub repository
100114

ansible/docker/Dockerfile.RHEL7

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
FROM registry.access.redhat.com/rhel7
2-
# This dockerfile should be built using this from the top level of the repository:
3-
# 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`
4-
ARG ROSIUSER
5-
RUN sed -i 's/\(def in_container():\)/\1\n return False/g' /usr/lib64/python*/*-packages/rhsm/config.py
6-
RUN --mount=type=secret,id=ROSIPW,required=true subscription-manager register --username=${ROSIUSER} --password="$(cat /run/secrets/ROSIPW)" --auto-attach
7-
RUN subscription-manager repos --enable rhel-7-for-system-z-optional-rpms
2+
RUN yum-config-manager --enable rhel-7-for-system-z-optional-rpms
83
# ^^ Optional repo needed for Xvfb
94

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

1712
COPY . /ansible
13+
COPY devkit /usr/local/devkit
1814

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

@@ -31,7 +27,10 @@ RUN useradd -c "Jenkins user" -d /home/${user} -u 1002 -g 1003 -m ${user}
3127
ENV \
3228
JDK7_BOOT_DIR="/usr/lib/jvm/java-1.7.0-openjdk" \
3329
JDK8_BOOT_DIR="/usr/lib/jvm/java-1.8.0-openjdk" \
34-
JDK10_BOOT_DIR="/usr/lib/jvm/jdk-10" \
3530
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
36-
RUN subscription-manager unregister
3731

32+
# While this does bloat the image it is required for building the
33+
# devkit, and the process for that runs as non-root ...
34+
# Disabled for now as we're going to copy from /usr/local/devkit on the host
35+
RUN yum clean all
36+
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

ansible/inventory.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,8 @@ hosts:
7070
solaris10u11-sparcv9-1: {ip: cloud.siteox.com, port: 24322}
7171

7272
- ibmcloud:
73-
win2012r2-x64-1: {ip: 169.48.4.138, user: Administrator}
74-
win2012r2-x64-2: {ip: 169.48.4.142, user: Administrator}
7573
win2022-x64-1: {ip: 52.118.206.11, user: Administrator}
7674

77-
- spearhead:
78-
freebsd12-x64-1: {ip: 185.131.222.224}
79-
8075
- docker:
8176

8277
- skytap:
@@ -89,8 +84,6 @@ hosts:
8984
ubuntu2204-x64-2: {ip: 20.83.24.86, description: 16 cores, 64GB}
9085

9186
- equinix:
92-
ubuntu2204-x64-1: {ip: 145.40.113.173, description: Intel Xeon Gold 40 core}
93-
ubuntu2004-x64-1: {ip: 145.40.114.58, description: AMD EPYC 7401P 24 core}
9487
ubuntu2004-armv8-1: {ip: 147.75.35.203, description: Ampere Altra 160 core, 512Gb}
9588
ubuntu2204-armv8-1: {ip: 139.178.86.243, description: Ampere Altra 160 cores, 512Gb}
9689

@@ -113,7 +106,7 @@ hosts:
113106

114107
- azure:
115108
win2016-x64-1: {ip: 52.149.211.210, user: adoptopenjdk}
116-
win2019-x64-1: {ip: 20.185.182.137, user: adoptopenjdk}
109+
win2019-x64-1: {ip: 13.92.177.186, user: adoptopenjdk}
117110
win2022-x64-1: {ip: 51.132.234.42, user: adoptopenjdk}
118111
win2022-x64-2: {ip: 20.26.116.218, user: adoptopenjdk}
119112
win11-aarch64-1: {ip: 20.4.31.184, user: adoptopenjdk}
@@ -178,5 +171,3 @@ hosts:
178171
rhel6-x64-1: {ip: 169.48.4.140}
179172
rhel7-x64-1: {ip: 169.48.4.136}
180173
ubuntu1604-x64-1: {ip: 169.48.4.141}
181-
win2012r2-x64-1: {ip: 169.48.4.131, user: Administrator}
182-
win2012r2-x64-2: {ip: 169.48.4.139, user: Administrator}

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
when:
9595
- (ansible_distribution != "Alpine" or ansible_architecture != "aarch64")
9696
- ansible_architecture != "riscv64"
97+
- ansible_architecture != "s390x"
9798
tags: build_tools
9899
- role: adoptopenjdk_install # JDK11 Build Bootstrap
99100
jdk_version: 10
@@ -120,6 +121,7 @@
120121
- ansible_distribution != "Solaris"
121122
- ansible_architecture != "riscv64"
122123
- ansible_architecture != "armv7l"
124+
- ansible_architecture != "s390x"
123125
tags: build_tools
124126
- role: adoptopenjdk_install # Current LTS
125127
jdk_version: 21

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/deploy_container/tasks/deploy.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@
2222
- name: Build {{ docker_image }} docker images
2323
command: docker build --cpu-period=100000 --cpu-quota=800000 -t aqa_{{ docker_image }} --memory=6G -f /tmp/Dockerfile.{{ docker_image }} /tmp/
2424

25-
# Without specifying a port here, docker will give the container a random unused port
26-
- name: Run {{ docker_image }} docker container
27-
command: docker run --restart unless-stopped -p 22 --cpuset-cpus="0-3" --memory=6G --detach --name {{ docker_image | upper }}.PORT aqa_{{ docker_image }}
25+
# Finds the highest port number already assigned and +1
26+
- name: Find available port
27+
shell: docker ps --format \"\{\{\.Ports\}\}\" | awk -F[:-] '{print $2}' | sort | tail -n 1
28+
register: docker_port_output
29+
30+
- name: Set docker_port variable if empty
31+
set_fact:
32+
docker_port: 32000
33+
when: docker_port_output.stdout == ""
2834

29-
# Now we want to rename the running container with the port name
30-
- name: Find assigned port of {{ docker_image }} container
31-
shell: docker port {{ docker_image | upper }}.PORT | head -n 1 | cut -d ':' -f 2
32-
register: docker_port
35+
- name: Set docker_port variable when non empty
36+
set_fact:
37+
docker_port: "{{ docker_port_output.stdout | int + 1 }}"
38+
when: not (docker_port_output.stdout == "")
3339

34-
- name: Rename {{ docker_image }} container to {{ docker_image | upper }}.{{ docker_port.stdout_lines[0] }}
35-
command: docker rename {{ docker_image | upper }}.PORT {{ docker_image | upper }}.{{ docker_port.stdout_lines[0] }}
40+
- name: Run {{ docker_image }} docker container
41+
command: docker run --restart unless-stopped -p {{ docker_port }}:22 --cpuset-cpus="0-3" --memory=6G --detach --name {{ docker_image | upper }}.{{ docker_port }} aqa_{{ docker_image }}

ansible/playbooks/nagios/roles/Nagios_Config/files/Nagios_Server_Config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929

3030
## Define Any Hosts That Should Be Excluded
3131

32-
excluded_hosts = {'build-spearhead-freebsd12-x64-1',
33-
'test-inspira-solaris10u11-sparcv9-1',
32+
excluded_hosts = {'test-inspira-solaris10u11-sparcv9-1',
3433
'build-inspira-solaris10u11-sparcv9-1',
3534
'build-inspira-solaris10u11-sparcv9-2',
3635
'infrastructure-aws-ubuntu1804-x64-1',

ansible/plugins/inventory/adoptopenjdk_yaml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
# providers - validated for consistency
4949
'provider': ('alibaba', 'azure', 'marist', 'osuosl',
50-
'macstadium', 'macincloud', 'ibmcloud', 'spearhead', 'siteox',
50+
'macstadium', 'macincloud', 'ibmcloud', 'siteox',
5151
'equinix', 'linaro','digitalocean', 'ibm', 'godaddy',
5252
'aws', 'inspira', 'equinix_esxi', 'nine', 'scaleway', 'skytap',
5353
'hetzner')

collections/requirements.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
collections:
55
- name: community.general
66
source: https://galaxy.ansible.com
7+
8+
- name: community.windows
9+
source: https://galaxy.ansible.com

0 commit comments

Comments
 (0)