mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 06:07:55 +00:00
Merge pull request #2051 from balena-io/fix-push-emulated-flag
push: Fix accidental rename of `-e` (emulated) option
This commit is contained in:
commit
fc8be3d8dc
@ -2251,9 +2251,10 @@ application name, or device address (for local pushes)
|
|||||||
Source directory to be sent to balenaCloud or balenaOS device
|
Source directory to be sent to balenaCloud or balenaOS device
|
||||||
(default: current working dir)
|
(default: current working dir)
|
||||||
|
|
||||||
#### -f, --emulated
|
#### -e, --emulated
|
||||||
|
|
||||||
Force an emulated build to occur on the remote builder
|
Don't use native ARM servers; force QEMU ARM emulation on Intel x86-64
|
||||||
|
servers during the image build (balenaCloud).
|
||||||
|
|
||||||
#### --dockerfile DOCKERFILE
|
#### --dockerfile DOCKERFILE
|
||||||
|
|
||||||
@ -2527,7 +2528,7 @@ name of the target balena application this build is for
|
|||||||
|
|
||||||
#### -e, --emulated
|
#### -e, --emulated
|
||||||
|
|
||||||
Run an emulated build using Qemu
|
Use QEMU for ARM architecture emulation during the image build
|
||||||
|
|
||||||
#### --dockerfile DOCKERFILE
|
#### --dockerfile DOCKERFILE
|
||||||
|
|
||||||
@ -2750,7 +2751,7 @@ don't upload build logs to the dashboard with image (if building)
|
|||||||
|
|
||||||
#### -e, --emulated
|
#### -e, --emulated
|
||||||
|
|
||||||
Run an emulated build using Qemu
|
Use QEMU for ARM architecture emulation during the image build
|
||||||
|
|
||||||
#### --dockerfile DOCKERFILE
|
#### --dockerfile DOCKERFILE
|
||||||
|
|
||||||
|
@ -121,8 +121,10 @@ export default class PushCmd extends Command {
|
|||||||
char: 's',
|
char: 's',
|
||||||
}),
|
}),
|
||||||
emulated: flags.boolean({
|
emulated: flags.boolean({
|
||||||
description: 'Force an emulated build to occur on the remote builder',
|
description: stripIndent`
|
||||||
char: 'f',
|
Don't use native ARM servers; force QEMU ARM emulation on Intel x86-64
|
||||||
|
servers during the image build (balenaCloud).`,
|
||||||
|
char: 'e',
|
||||||
}),
|
}),
|
||||||
dockerfile: flags.string({
|
dockerfile: flags.string({
|
||||||
description:
|
description:
|
||||||
|
@ -28,9 +28,7 @@ export const trackPromise = new Promise((resolve) => {
|
|||||||
* parsed by oclif, but before the command's run() function is called.
|
* parsed by oclif, but before the command's run() function is called.
|
||||||
* See: https://oclif.io/docs/hooks
|
* See: https://oclif.io/docs/hooks
|
||||||
*
|
*
|
||||||
* This hook is used to track CLI command signatures with mixpanel. This
|
* This hook is used to track CLI command signatures with mixpanel.
|
||||||
* is the oclif version of what is already done for Capitano commands.
|
|
||||||
*
|
|
||||||
* A command signature is something like "env add NAME [VALUE]". That's
|
* A command signature is something like "env add NAME [VALUE]". That's
|
||||||
* literally so: 'NAME' and 'VALUE' are NOT replaced with actual values.
|
* literally so: 'NAME' and 'VALUE' are NOT replaced with actual values.
|
||||||
*/
|
*/
|
||||||
|
@ -17,90 +17,7 @@
|
|||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { ExpectedError } from '../errors';
|
import { ExpectedError } from '../errors';
|
||||||
import { getChalk, stripIndent } from './lazy';
|
import { getChalk } from './lazy';
|
||||||
|
|
||||||
export function appendOptions(opts) {
|
|
||||||
return opts.concat([
|
|
||||||
{
|
|
||||||
signature: 'emulated',
|
|
||||||
description: 'Run an emulated build using Qemu',
|
|
||||||
boolean: true,
|
|
||||||
alias: 'e',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'dockerfile',
|
|
||||||
parameter: 'Dockerfile',
|
|
||||||
description:
|
|
||||||
'Alternative Dockerfile name/path, relative to the source folder',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'logs',
|
|
||||||
description:
|
|
||||||
'No-op and deprecated since balenaCLI v12.0.0. Build logs are now shown by default.',
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'nologs',
|
|
||||||
description:
|
|
||||||
'Hide the image build log output (produce less verbose output)',
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'gitignore',
|
|
||||||
alias: 'g',
|
|
||||||
description: stripIndent`
|
|
||||||
Consider .gitignore files in addition to the .dockerignore file. This reverts
|
|
||||||
to the CLI v11 behavior/implementation (deprecated) if compatibility is required
|
|
||||||
until your project can be adapted.`,
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'multi-dockerignore',
|
|
||||||
alias: 'm',
|
|
||||||
description:
|
|
||||||
'Have each service use its own .dockerignore file. See "balena help build".',
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'nogitignore',
|
|
||||||
description: `No-op (default behavior) since v12.0.0. See "balena help build".`,
|
|
||||||
boolean: true,
|
|
||||||
alias: 'G',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'noparent-check',
|
|
||||||
description:
|
|
||||||
"Disable project validation check of 'docker-compose.yml' file in parent folder",
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'registry-secrets',
|
|
||||||
alias: 'R',
|
|
||||||
parameter: 'secrets.yml|.json',
|
|
||||||
description:
|
|
||||||
'Path to a YAML or JSON file with passwords for a private Docker registry',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'convert-eol',
|
|
||||||
description: 'No-op and deprecated since v12.0.0',
|
|
||||||
boolean: true,
|
|
||||||
alias: 'l',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'noconvert-eol',
|
|
||||||
description:
|
|
||||||
"Don't convert line endings from CRLF (Windows format) to LF (Unix format).",
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'projectName',
|
|
||||||
parameter: 'projectName',
|
|
||||||
description:
|
|
||||||
'Specify an alternate project name; default is the directory name',
|
|
||||||
alias: 'n',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns Promise<{import('./compose-types').ComposeOpts}>
|
* @returns Promise<{import('./compose-types').ComposeOpts}>
|
||||||
|
@ -909,7 +909,8 @@ export function createRunLoop(tick: (...args: any[]) => void) {
|
|||||||
|
|
||||||
export const composeCliFlags: flags.Input<ComposeCliFlags> = {
|
export const composeCliFlags: flags.Input<ComposeCliFlags> = {
|
||||||
emulated: flags.boolean({
|
emulated: flags.boolean({
|
||||||
description: 'Run an emulated build using Qemu',
|
description:
|
||||||
|
'Use QEMU for ARM architecture emulation during the image build',
|
||||||
char: 'e',
|
char: 'e',
|
||||||
}),
|
}),
|
||||||
dockerfile: flags.string({
|
dockerfile: flags.string({
|
||||||
|
@ -20,92 +20,6 @@
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { ExpectedError } from '../errors';
|
import { ExpectedError } from '../errors';
|
||||||
|
|
||||||
// Use this function to seed an action's list of capitano options
|
|
||||||
// with the docker options. Using this interface means that
|
|
||||||
// all functions using docker will expose the same interface
|
|
||||||
//
|
|
||||||
// NOTE: Care MUST be taken when using the function, so as to
|
|
||||||
// not redefine/override options already provided.
|
|
||||||
export const appendConnectionOptions = (opts) =>
|
|
||||||
opts.concat([
|
|
||||||
{
|
|
||||||
signature: 'docker',
|
|
||||||
parameter: 'docker',
|
|
||||||
description: 'Path to a local docker socket (e.g. /var/run/docker.sock)',
|
|
||||||
alias: 'P',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'dockerHost',
|
|
||||||
parameter: 'dockerHost',
|
|
||||||
description:
|
|
||||||
'Docker daemon hostname or IP address (dev machine or balena device) ',
|
|
||||||
alias: 'h',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'dockerPort',
|
|
||||||
parameter: 'dockerPort',
|
|
||||||
description:
|
|
||||||
'Docker daemon TCP port number (hint: 2375 for balena devices)',
|
|
||||||
alias: 'p',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'ca',
|
|
||||||
parameter: 'ca',
|
|
||||||
description: 'Docker host TLS certificate authority file',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'cert',
|
|
||||||
parameter: 'cert',
|
|
||||||
description: 'Docker host TLS certificate file',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'key',
|
|
||||||
parameter: 'key',
|
|
||||||
description: 'Docker host TLS key file',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Use this function to seed an action's list of capitano options
|
|
||||||
// with the docker options. Using this interface means that
|
|
||||||
// all functions using docker will expose the same interface
|
|
||||||
//
|
|
||||||
// NOTE: Care MUST be taken when using the function, so as to
|
|
||||||
// not redefine/override options already provided.
|
|
||||||
export function appendOptions(opts) {
|
|
||||||
return appendConnectionOptions(opts).concat([
|
|
||||||
{
|
|
||||||
signature: 'tag',
|
|
||||||
parameter: 'tag',
|
|
||||||
description: 'The alias to the generated image',
|
|
||||||
alias: 't',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'buildArg',
|
|
||||||
parameter: 'arg',
|
|
||||||
description:
|
|
||||||
'Set a build-time variable (eg. "-B \'ARG=value\'"). Can be specified multiple times.',
|
|
||||||
alias: 'B',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'cache-from',
|
|
||||||
parameter: 'image-list',
|
|
||||||
description: `\
|
|
||||||
Comma-separated list (no spaces) of image names for build cache resolution. \
|
|
||||||
Implements the same feature as the "docker build --cache-from" option.`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'nocache',
|
|
||||||
description: "Don't use docker layer caching when building",
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
signature: 'squash',
|
|
||||||
description: 'Squash newly built layers into a single new layer',
|
|
||||||
boolean: true,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
const generateConnectOpts = async function (opts) {
|
const generateConnectOpts = async function (opts) {
|
||||||
const { promises: fs } = await import('fs');
|
const { promises: fs } = await import('fs');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user