From 84160313e737236047a7f5bc97513faa6200c679 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Jun 2021 21:13:50 +0200 Subject: [PATCH 1/2] cli: mark create-github-app as ready for use Signed-off-by: Patrik Oldsberg --- .changeset/cool-poems-train.md | 5 +++++ packages/cli/src/commands/index.ts | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changeset/cool-poems-train.md diff --git a/.changeset/cool-poems-train.md b/.changeset/cool-poems-train.md new file mode 100644 index 0000000000..fb4ba6621e --- /dev/null +++ b/.changeset/cool-poems-train.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Mark the `create-github-app` command as ready for use and reveal it in the command list. diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index ae39941106..892c5459da 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -225,10 +225,8 @@ export function registerCommands(program: CommanderStatic) { .action(lazy(() => import('./buildWorkspace').then(m => m.default))); program - .command('create-github-app ', { hidden: true }) - .description( - 'Create new GitHub App in your organization. This command is experimental and may change in the future.', - ) + .command('create-github-app ') + .description('Create new GitHub App in your organization.') .action(lazy(() => import('./create-github-app').then(m => m.default))); } From 054bcd029ce4281f4e2b36fa8c5144d17c408cad Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 1 Jun 2021 21:20:11 +0200 Subject: [PATCH 2/2] cli: deprecate backend:build-image Signed-off-by: Patrik Oldsberg --- .changeset/strong-mails-drum.md | 5 +++++ packages/cli/src/commands/backend/buildImage.ts | 10 ++++++++++ packages/cli/src/commands/index.ts | 6 +----- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .changeset/strong-mails-drum.md 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)));