Skip to content

Commit

Permalink
[build] Remove ubi8 (elastic#173873)
Browse files Browse the repository at this point in the history
RHEL 8.10 will be the final ubi8 release. We already have builds in
place for transitioning to ubi9.

Depends on elastic#170264.
  • Loading branch information
jbudz authored Jan 3, 2024
1 parent fb6b3e8 commit 7c2b3f1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
4 changes: 0 additions & 4 deletions .buildkite/scripts/steps/artifacts/docker_context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,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)
Expand Down
15 changes: 2 additions & 13 deletions src/dev/build/tasks/os_packages/create_os_package_tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,7 @@ export const CreateDockerUBI: Task = {
async run(config, log, build) {
await runDockerGenerator(config, log, build, {
architecture: 'x64',
baseImage: 'ubi8',
context: false,
image: true,
});
await runDockerGenerator(config, log, build, {
architecture: 'x64',
baseImage: 'ubi9',
baseImage: 'ubi',
context: false,
image: true,
});
Expand Down Expand Up @@ -154,12 +148,7 @@ export const CreateDockerContexts: Task = {
dockerBuildDate,
});
await runDockerGenerator(config, log, build, {
baseImage: 'ubi8',
context: true,
image: false,
});
await runDockerGenerator(config, log, build, {
baseImage: 'ubi9',
baseImage: 'ubi',
context: true,
image: false,
});
Expand Down
8 changes: 3 additions & 5 deletions src/dev/build/tasks/os_packages/docker_generator/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function runDockerGenerator(
build: Build,
flags: {
architecture?: string;
baseImage: 'none' | 'ubi9' | 'ubi8' | 'ubuntu';
baseImage: 'none' | 'ubi' | 'ubuntu';
context: boolean;
image: boolean;
ironbank?: boolean;
Expand All @@ -40,12 +40,10 @@ export async function runDockerGenerator(
) {
let baseImageName = '';
if (flags.baseImage === 'ubuntu') baseImageName = 'ubuntu:20.04';
if (flags.baseImage === 'ubi8') baseImageName = 'docker.elastic.co/ubi8/ubi-minimal:latest';
if (flags.baseImage === 'ubi9') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest';
if (flags.baseImage === 'ubi') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest';

let imageFlavor = '';
if (flags.baseImage === 'ubi8') imageFlavor += `-ubi8`;
if (flags.baseImage === 'ubi9') imageFlavor += `-ubi`;
if (flags.baseImage === 'ubi') imageFlavor += `-ubi`;
if (flags.ironbank) imageFlavor += '-ironbank';
if (flags.cloud) imageFlavor += '-cloud';
if (flags.serverless) imageFlavor += '-serverless';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface TemplateContext {
dockerBuildDate: string;
usePublicArtifact?: boolean;
publicArtifactSubdomain: string;
baseImage: 'none' | 'ubi8' | 'ubi9' | 'ubuntu';
baseImage: 'none' | 'ubi' | 'ubuntu';
baseImageName: string;
cloud?: boolean;
serverless?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function generator(options: TemplateContext) {
const dir = options.ironbank ? 'ironbank' : 'base';
const template = readFileSync(resolve(__dirname, dir, './Dockerfile'));
return Mustache.render(template.toString(), {
packageManager: options.baseImage.includes('ubi') ? 'microdnf' : 'apt-get',
ubi: options.baseImage.includes('ubi'),
packageManager: options.baseImage === 'ubi' ? 'microdnf' : 'apt-get',
ubi: options.baseImage === 'ubi',
ubuntu: options.baseImage === 'ubuntu',
opensslLegacyProvider: !(options.cloud || options.serverless),
...options,
Expand Down

0 comments on commit 7c2b3f1

Please sign in to comment.