Skip to content

Commit

Permalink
ironbank: move to ubi9 (#37017)
Browse files Browse the repository at this point in the history
* ironbank: move to ubi9

* packaging: ubi-minimal 9 requires -y to bypass the prompt

---------

Co-authored-by: Pierre HILBERT <[email protected]>
  • Loading branch information
v1v and pierrehilbert authored Nov 6, 2023
1 parent 024a9ce commit d4630af
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def linuxPlatforms() {
def pushCIDockerImages(Map args = [:]) {
def arch = args.get('arch', 'amd64')
catchError(buildResult: 'UNSTABLE', message: 'Unable to push Docker images', stageResult: 'FAILURE') {
def defaultVariants = [ '' : 'beats', '-oss' : 'beats', '-ubi8' : 'beats' ]
def defaultVariants = [ '' : 'beats', '-oss' : 'beats', '-ubi9' : 'beats' ]
if (env?.BEATS_FOLDER?.endsWith('auditbeat')) {
tagAndPush(beatName: 'auditbeat', arch: arch, variants: defaultVariants)
} else if (env?.BEATS_FOLDER?.endsWith('filebeat')) {
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def pushCIDockerImages(Map args = [:]) {
def arch = args.get('arch', 'amd64')
def beatsFolder = args.beatsFolder
catchError(buildResult: 'UNSTABLE', message: 'Unable to push Docker images', stageResult: 'FAILURE') {
def defaultVariants = [ '' : 'beats', '-oss' : 'beats', '-ubi8' : 'beats' ]
def defaultVariants = [ '' : 'beats', '-oss' : 'beats', '-ubi9' : 'beats' ]
if (beatsFolder.endsWith('auditbeat')) {
tagAndPush(beatName: 'auditbeat', arch: arch, variants: defaultVariants)
} else if (beatsFolder.endsWith('filebeat')) {
Expand Down
6 changes: 3 additions & 3 deletions dev-tools/dependencies-report
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ go list -m -json all $@ | go run go.elastic.co/go-licence-detector \
# Fill-in required values for UBI images
# Check headers in $SRCPATH/notice/dependencies.csv.tmpl:
# name,url,version,revision,license
ubi8url='https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8'
ubi8source='https://oss-dependencies.elastic.co/red-hat-universal-base-image-minimal/8/ubi-minimal-8-source.tar.gz'
ubiurl='https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5'
ubisource='https://oss-dependencies.elastic.co/red-hat-universal-base-image-minimal/9/ubi-minimal-9-source.tar.gz'
ubilicense='Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf'
cat <<EOF >> $outfile
Red Hat Universal Base Image minimal,$ubi8url,8,,$ubilicense,$ubi8source
Red Hat Universal Base Image minimal,$ubiurl,9,,$ubilicense,$ubisource
EOF
8 changes: 4 additions & 4 deletions dev-tools/packaging/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ shared:

- &docker_ubi_spec
extra_vars:
image_name: '{{.BeatName}}-ubi8'
from: 'docker.elastic.co/ubi8/ubi-minimal'
image_name: '{{.BeatName}}-ubi9'
from: 'docker.elastic.co/ubi9/ubi-minimal'

- &docker_arm_ubi_spec
extra_vars:
image_name: '{{.BeatName}}-ubi8'
from: 'registry.access.redhat.com/ubi8/ubi-minimal:8.2'
image_name: '{{.BeatName}}-ubi9'
from: 'registry.access.redhat.com/ubi9/ubi-minimal:9.2'

- &elastic_docker_spec
extra_vars:
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/packaging/templates/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FROM {{ .from }}

{{- if contains .from "ubi-minimal" }}
RUN microdnf -y update && \
microdnf install findutils shadow-utils && \
microdnf -y install findutils shadow-utils && \
microdnf clean all
{{- else }}
RUN for iter in {1..10}; do \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Extract Auditbeat and make various file manipulations.
################################################################################
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_IMAGE=redhat/ubi/ubi9
ARG BASE_TAG=9.2

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:

# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_IMAGE: "redhat/ubi/ubi9"
BASE_TAG: "9.2"
ELASTIC_STACK: "{{ beat_version }}"
ELASTIC_PRODUCT: "auditbeat"
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/packaging/templates/ironbank/filebeat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Extract Filebeat and make various file manipulations.
################################################################################
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_IMAGE=redhat/ubi/ubi9
ARG BASE_TAG=9.2

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:

# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_IMAGE: "redhat/ubi/ubi9"
BASE_TAG: "9.2"
ELASTIC_STACK: "{{ beat_version }}"
ELASTIC_PRODUCT: "filebeat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Extract Heartbeat and make various file manipulations.
################################################################################
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_IMAGE=redhat/ubi/ubi9
ARG BASE_TAG=9.2

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as prep_files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:

# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_IMAGE: "redhat/ubi/ubi9"
BASE_TAG: "9.2"
ELASTIC_STACK: "{{ beat_version }}"
ELASTIC_PRODUCT: "heartbeat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Extract Metricbeat and make various file manipulations.
################################################################################
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_IMAGE=redhat/ubi/ubi9
ARG BASE_TAG=9.2

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:

# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_IMAGE: "redhat/ubi/ubi9"
BASE_TAG: "9.2"
ELASTIC_STACK: "{{ beat_version }}"
ELASTIC_PRODUCT: "metricbeat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Extract Packetbeat and make various file manipulations.
################################################################################
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8
ARG BASE_IMAGE=redhat/ubi/ubi9
ARG BASE_TAG=9.2

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:

# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: "redhat/ubi/ubi8"
BASE_IMAGE: "redhat/ubi/ubi9"
BASE_TAG: "9.2"
ELASTIC_STACK: "{{ beat_version }}"
ELASTIC_PRODUCT: "packetbeat"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/heartbeat/ironbank/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ package: ## Package heartbeat for the artifacts consumed by the ironbank docker
validate-ironbank: prepare
docker build \
--build-arg BASE_REGISTRY=docker.elastic.co \
--build-arg BASE_IMAGE=ubi8/ubi \
--build-arg BASE_IMAGE=ubi9/ubi \
--build-arg BASE_TAG=latest \
$(LOCATION)

0 comments on commit d4630af

Please sign in to comment.