diff --git a/.changeset/strong-mails-drum.md b/.changeset/strong-mails-drum.md new file mode 100644 index 0000000000..e1a069e953 --- /dev/null +++ b/.changeset/strong-mails-drum.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Deprecated the `backend:build-image` command, pointing to the newer `backend:bundle` command. diff --git a/packages/cli/src/commands/backend/buildImage.ts b/packages/cli/src/commands/backend/buildImage.ts index 654f51cd10..8434017cd9 100644 --- a/packages/cli/src/commands/backend/buildImage.ts +++ b/packages/cli/src/commands/backend/buildImage.ts @@ -15,6 +15,7 @@ */ import { Command } from 'commander'; +import { yellow } from 'chalk'; import fs from 'fs-extra'; import { join as joinPath, relative as relativePath } from 'path'; import { createDistWorkspace } from '../../lib/packager'; @@ -31,6 +32,15 @@ export default async (cmd: Command) => { return; } + console.warn( + yellow(` +The backend:build-image command is deprecated and will be removed in the future. +Please use the backend:bundle command instead along with your own Docker setup. + + https://backstage.io/docs/deployment/docker +`), + ); + const pkgPath = paths.resolveTarget(PKG_PATH); const pkg = await fs.readJson(pkgPath); const appConfigs = await findAppConfigs(); diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 892c5459da..431659a972 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -60,11 +60,7 @@ export function registerCommands(program: CommanderStatic) { .helpOption(', --backstage-cli-help') // Let docker handle --help .option('--build', 'Build packages before packing them into the image') .description( - // TODO: Add example use cases in Backstage documentation. - // For example, if a $NPM_TOKEN needs to be exposed, run `backend:build-image --secret - // id=NPM_TOKEN,src=/NPM_TOKEN.txt`. - 'Bundles the package into a docker image. All extra args are forwarded to ' + - '`docker image build`.', + 'Bundles the package into a docker image. This command is deprecated and will be removed.', ) .action(lazy(() => import('./backend/buildImage').then(m => m.default)));