diff --git a/.buildkite/scripts/steps/artifacts/docker_context.sh b/.buildkite/scripts/steps/artifacts/docker_context.sh index 1982be6d5587f..4dd8d6ebd9eb6 100755 --- a/.buildkite/scripts/steps/artifacts/docker_context.sh +++ b/.buildkite/scripts/steps/artifacts/docker_context.sh @@ -19,11 +19,7 @@ case $KIBANA_DOCKER_CONTEXT in cloud) DOCKER_CONTEXT_FILE="kibana-cloud-$FULL_VERSION-docker-build-context.tar.gz" ;; - ubi8) - DOCKER_CONTEXT_FILE="kibana-ubi8-$FULL_VERSION-docker-build-context.tar.gz" - ;; ubi) - # Currently ubi9. After ubi8 we're moving to a version agnostic filename DOCKER_CONTEXT_FILE="kibana-ubi-$FULL_VERSION-docker-build-context.tar.gz" ;; ironbank) diff --git a/src/dev/build/tasks/os_packages/create_os_package_tasks.ts b/src/dev/build/tasks/os_packages/create_os_package_tasks.ts index 4b0654fb6f80d..8230f6e41b7a6 100644 --- a/src/dev/build/tasks/os_packages/create_os_package_tasks.ts +++ b/src/dev/build/tasks/os_packages/create_os_package_tasks.ts @@ -78,13 +78,7 @@ export const CreateDockerUBI: Task = { await runDockerGenerator(config, log, build, { architecture: 'x64', context: false, - ubi8: true, - image: true, - }); - await runDockerGenerator(config, log, build, { - architecture: 'x64', - context: false, - ubi9: true, + ubi: true, image: true, }); }, @@ -122,12 +116,7 @@ export const CreateDockerContexts: Task = { dockerBuildDate, }); await runDockerGenerator(config, log, build, { - ubi8: true, - context: true, - image: false, - }); - await runDockerGenerator(config, log, build, { - ubi9: true, + ubi: true, context: true, image: false, }); diff --git a/src/dev/build/tasks/os_packages/docker_generator/run.ts b/src/dev/build/tasks/os_packages/docker_generator/run.ts index 657421811afc7..5361110ef48da 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/run.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/run.ts @@ -30,8 +30,7 @@ export async function runDockerGenerator( architecture?: string; context: boolean; image: boolean; - ubi8?: boolean; - ubi9?: boolean; + ubi?: boolean; ubuntu?: boolean; ironbank?: boolean; cloud?: boolean; @@ -40,12 +39,10 @@ export async function runDockerGenerator( ) { let baseOSImage = ''; if (flags.ubuntu) baseOSImage = 'ubuntu:20.04'; - if (flags.ubi8) baseOSImage = 'docker.elastic.co/ubi8/ubi-minimal:latest'; - if (flags.ubi9) baseOSImage = 'docker.elastic.co/ubi9/ubi-minimal:latest'; + if (flags.ubi) baseOSImage = 'docker.elastic.co/ubi9/ubi-minimal:latest'; let imageFlavor = ''; - if (flags.ubi8) imageFlavor += '-ubi8'; - if (flags.ubi9) imageFlavor += '-ubi'; + if (flags.ubi) imageFlavor += '-ubi'; if (flags.ironbank) imageFlavor += '-ironbank'; if (flags.cloud) imageFlavor += '-cloud'; @@ -91,8 +88,7 @@ export async function runDockerGenerator( dockerCrossCompile, baseOSImage, dockerBuildDate, - ubi8: flags.ubi8, - ubi9: flags.ubi9, + ubi: flags.ubi, ubuntu: flags.ubuntu, cloud: flags.cloud, metricbeatTarball, diff --git a/src/dev/build/tasks/os_packages/docker_generator/template_context.ts b/src/dev/build/tasks/os_packages/docker_generator/template_context.ts index 993ed79392037..7705b1d16d248 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/template_context.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/template_context.ts @@ -22,8 +22,7 @@ export interface TemplateContext { dockerBuildDate: string; usePublicArtifact?: boolean; publicArtifactSubdomain: string; - ubi8?: boolean; - ubi9?: boolean; + ubi?: boolean; ubuntu?: boolean; cloud?: boolean; metricbeatTarball?: string; diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts b/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts index 322f40dba7cc8..62126e2ef3e87 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts @@ -15,11 +15,10 @@ import { TemplateContext } from '../template_context'; function generator(options: TemplateContext) { const dir = options.ironbank ? 'ironbank' : 'base'; const template = readFileSync(resolve(__dirname, dir, './Dockerfile')); - const ubi = Boolean(options.ubi8 || options.ubi9); return Mustache.render(template.toString(), { - packageManager: ubi ? 'microdnf' : 'apt-get', + packageManager: options.ubi ? 'microdnf' : 'apt-get', opensslLegacyProvider: !options.cloud, - ubi, + ubi: options.ubi, ...options, }); }