Skip to content

Commit

Permalink
[7.17] [build] Remove ubi8 (#173873) (#174213)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz authored Jan 4, 2024
1 parent 152243f commit c169e29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 30 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 @@ -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)
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 @@ -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,
});
},
Expand Down Expand Up @@ -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,
});
Expand Down
12 changes: 4 additions & 8 deletions src/dev/build/tasks/os_packages/docker_generator/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';

Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
Expand Down

0 comments on commit c169e29

Please sign in to comment.