cli: deprecate backend:build-image

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-06-01 21:20:11 +02:00
parent 84160313e7
commit 054bcd029c
3 changed files with 16 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Deprecated the `backend:build-image` command, pointing to the newer `backend:bundle` command.
@@ -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();
+1 -5
View File
@@ -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)));