[build] Rename chainguard -> wolfi (#187095)

To be consistent with other stack products.
This commit is contained in:
Jon 2024-06-28 09:13:52 -05:00 committed by GitHub
parent e23230f072
commit 9854ecf93c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 36 additions and 37 deletions

View file

@ -92,7 +92,7 @@ steps:
- exit_status: '*'
limit: 1
- command: KIBANA_DOCKER_CONTEXT=chainguard .buildkite/scripts/steps/artifacts/docker_context.sh
- command: KIBANA_DOCKER_CONTEXT=wolfi .buildkite/scripts/steps/artifacts/docker_context.sh
label: 'Docker Context Verification'
agents:
image: family/kibana-ubuntu-2004

View file

@ -32,7 +32,7 @@ if is_pr_with_label "ci:build-cloud-image"; then
--skip-docker-ubi \
--skip-docker-fips \
--skip-docker-ubuntu \
--skip-docker-chainguard \
--skip-docker-wolfi \
--skip-docker-serverless \
--skip-docker-contexts

View file

@ -34,7 +34,7 @@ node scripts/build \
--docker-namespace="kibana-ci" \
--docker-tag="$KIBANA_IMAGE_TAG" \
--skip-docker-ubuntu \
--skip-docker-chainguard \
--skip-docker-wolfi \
--skip-docker-ubi \
--skip-docker-cloud \
--skip-docker-contexts \

View file

@ -20,8 +20,8 @@ case $KIBANA_DOCKER_CONTEXT in
default)
DOCKER_CONTEXT_FILE="kibana-$FULL_VERSION-docker-build-context.tar.gz"
;;
chainguard)
DOCKER_CONTEXT_FILE="kibana-chainguard-$FULL_VERSION-docker-build-context.tar.gz"
wolfi)
DOCKER_CONTEXT_FILE="kibana-wolfi-$FULL_VERSION-docker-build-context.tar.gz"
;;
cloud)
DOCKER_CONTEXT_FILE="kibana-cloud-$FULL_VERSION-docker-build-context.tar.gz"

View file

@ -43,7 +43,7 @@ else
--skip-docker-ubi \
--skip-docker-fips \
--skip-docker-ubuntu \
--skip-docker-chainguard \
--skip-docker-wolfi \
--skip-docker-serverless \
--skip-docker-contexts
fi

View file

@ -23,7 +23,7 @@ node scripts/build \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-chainguard \
--skip-docker-wolfi \
--skip-docker-cloud \
--skip-docker-serverless \
--skip-docker-contexts

View file

@ -31,13 +31,13 @@ it('build default and oss dist for current platform, without packages, by defaul
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": false,
"createDockerChainguard": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerFIPS": false,
"createDockerServerless": false,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createDockerWolfi": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@ -73,13 +73,13 @@ it('builds packages if --all-platforms is passed', () => {
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": true,
"createDockerChainguard": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerFIPS": true,
"createDockerServerless": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
"createDockerWolfi": true,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
@ -115,13 +115,13 @@ it('limits packages if --rpm passed with --all-platforms', () => {
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": false,
"createDockerChainguard": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerFIPS": false,
"createDockerServerless": false,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createDockerWolfi": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
@ -157,13 +157,13 @@ it('limits packages if --deb passed with --all-platforms', () => {
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": true,
"createDockerChainguard": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerFIPS": false,
"createDockerServerless": false,
"createDockerUBI": false,
"createDockerUbuntu": false,
"createDockerWolfi": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@ -200,13 +200,13 @@ it('limits packages if --docker passed with --all-platforms', () => {
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": false,
"createDockerChainguard": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerFIPS": true,
"createDockerServerless": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
"createDockerWolfi": true,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@ -250,13 +250,13 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": false,
"createDockerChainguard": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerFIPS": true,
"createDockerServerless": true,
"createDockerUBI": false,
"createDockerUbuntu": true,
"createDockerWolfi": true,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@ -293,13 +293,13 @@ it('limits packages if --all-platforms passed with --skip-docker-ubuntu', () =>
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": true,
"createDockerChainguard": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerFIPS": true,
"createDockerServerless": true,
"createDockerUBI": true,
"createDockerUbuntu": false,
"createDockerWolfi": true,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
@ -336,13 +336,13 @@ it('limits packages if --all-platforms passed with --skip-docker-fips', () => {
"createArchives": true,
"createCdnAssets": true,
"createDebPackage": true,
"createDockerChainguard": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerFIPS": false,
"createDockerServerless": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
"createDockerWolfi": true,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,

View file

@ -31,7 +31,7 @@ export function readCliArgs(argv: string[]) {
'skip-docker-contexts',
'skip-docker-ubi',
'skip-docker-ubuntu',
'skip-docker-chainguard',
'skip-docker-wolfi',
'skip-docker-cloud',
'skip-docker-serverless',
'skip-docker-fips',
@ -141,8 +141,7 @@ export function readCliArgs(argv: string[]) {
createDebPackage: isOsPackageDesired('deb'),
createDockerUbuntu:
isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-ubuntu']),
createDockerChainguard:
isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-chainguard']),
createDockerWolfi: isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-wolfi']),
createDockerCloud: isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-cloud']),
createDockerServerless:
(isOsPackageDesired('docker-images') && !Boolean(flags['skip-docker-serverless'])) ||

View file

@ -31,7 +31,7 @@ export interface BuildOptions {
createDebPackage: boolean;
createDockerUBI: boolean;
createDockerUbuntu: boolean;
createDockerChainguard: boolean;
createDockerWolfi: boolean;
createDockerCloud: boolean;
createDockerServerless: boolean;
createDockerContexts: boolean;
@ -151,9 +151,9 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
await run(Tasks.CreateDockerUbuntu);
}
if (options.createDockerChainguard) {
// control w/ --docker-images or --skip-docker-chainguard or --skip-os-packages
await run(Tasks.CreateDockerChainguard);
if (options.createDockerWolfi) {
// control w/ --docker-images or --skip-docker-wolfi or --skip-os-packages
await run(Tasks.CreateDockerWolfi);
}
if (options.createDockerCloud) {
// control w/ --docker-images and --skip-docker-cloud

View file

@ -47,7 +47,7 @@ if (showHelp) {
--skip-cdn-assets {dim Don't build CDN assets}
--skip-docker-ubi {dim Don't build the docker ubi image}
--skip-docker-ubuntu {dim Don't build the docker ubuntu image}
--skip-docker-chainguard {dim Don't build the docker chainguard image}
--skip-docker-wolfi {dim Don't build the docker wolfi image}
--skip-docker-fips {dim Don't build the docker fips image}
--release {dim Produce a release-ready distributable}
--version-qualifier {dim Suffix version with a qualifier}

View file

@ -80,20 +80,20 @@ export const CreateDockerUbuntu: Task = {
},
};
export const CreateDockerChainguard: Task = {
description: 'Creating Docker Chainguard image',
export const CreateDockerWolfi: Task = {
description: 'Creating Docker Wolfi image',
async run(config, log, build) {
await runDockerGenerator(config, log, build, {
architecture: 'x64',
baseImage: 'chainguard',
baseImage: 'wolfi',
context: false,
image: true,
dockerBuildDate,
});
await runDockerGenerator(config, log, build, {
architecture: 'aarch64',
baseImage: 'chainguard',
baseImage: 'wolfi',
context: false,
image: true,
dockerBuildDate,
@ -183,7 +183,7 @@ export const CreateDockerContexts: Task = {
dockerBuildDate,
});
await runDockerGenerator(config, log, build, {
baseImage: 'chainguard',
baseImage: 'wolfi',
context: true,
image: false,
dockerBuildDate,

View file

@ -29,7 +29,7 @@ export async function runDockerGenerator(
build: Build,
flags: {
architecture?: string;
baseImage: 'none' | 'chainguard' | 'ubi' | 'ubuntu';
baseImage: 'none' | 'wolfi' | 'ubi' | 'ubuntu';
context: boolean;
image: boolean;
ironbank?: boolean;
@ -42,12 +42,12 @@ export async function runDockerGenerator(
let baseImageName = '';
if (flags.baseImage === 'ubuntu') baseImageName = 'ubuntu:20.04';
if (flags.baseImage === 'ubi') baseImageName = 'docker.elastic.co/ubi9/ubi-minimal:latest';
if (flags.baseImage === 'chainguard')
if (flags.baseImage === 'wolfi')
baseImageName = 'docker.elastic.co/wolfi/chainguard-base:20230214';
let imageFlavor = '';
if (flags.baseImage === 'ubi') imageFlavor += `-ubi`;
if (flags.baseImage === 'chainguard') imageFlavor += `-chainguard`;
if (flags.baseImage === 'wolfi') imageFlavor += `-wolfi`;
if (flags.ironbank) imageFlavor += '-ironbank';
if (flags.cloud) imageFlavor += '-cloud';
if (flags.serverless) imageFlavor += '-serverless';

View file

@ -24,7 +24,7 @@ export interface TemplateContext {
dockerBuildDate: string;
usePublicArtifact?: boolean;
publicArtifactSubdomain: string;
baseImage: 'none' | 'ubi' | 'ubuntu' | 'chainguard';
baseImage: 'none' | 'ubi' | 'ubuntu' | 'wolfi';
baseImageName: string;
cloud?: boolean;
serverless?: boolean;

View file

@ -17,9 +17,9 @@ RUN microdnf install -y findutils tar gzip
{{#ubuntu}}
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl
{{/ubuntu}}
{{#chainguard}}
{{#wolfi}}
RUN apk --no-cache add curl
{{/chainguard}}
{{/wolfi}}
{{#usePublicArtifact}}
RUN cd /tmp && \
@ -109,9 +109,9 @@ RUN for iter in {1..10}; do \
done; \
(exit $exit_code)
{{/ubuntu}}
{{#chainguard}}
{{#wolfi}}
RUN apk --no-cache add bash curl fontconfig libstdc++ freetype nss findutils shadow
{{/chainguard}}
{{/wolfi}}
# Bring in Kibana from the initial stage.
COPY --from=builder --chown=1000:0 /usr/share/kibana /usr/share/kibana

View file

@ -16,7 +16,7 @@ function generator(options: TemplateContext) {
const dir = options.ironbank ? 'ironbank' : 'base';
const template = readFileSync(resolve(__dirname, dir, './Dockerfile'));
return Mustache.render(template.toString(), {
chainguard: options.baseImage === 'chainguard',
wolfi: options.baseImage === 'wolfi',
ubi: options.baseImage === 'ubi',
ubuntu: options.baseImage === 'ubuntu',
opensslLegacyProvider: !(options.cloud || options.serverless || options.fips),