mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
Merge pull request #1400 from balena-io/1397-fix-build-registry-secrets
Fix failing registry secrets authentication under certain conditions
This commit is contained in:
commit
4a80beac35
@ -1447,8 +1447,12 @@ Sample registry-secrets YAML file:
|
||||
username: '_json_key'
|
||||
password: '{escaped contents of the GCR keyfile.json file}'
|
||||
|
||||
If an option is not specified, and a secrets.yml or secrets.json file exists in
|
||||
the balena directory (usually $HOME/.balena), this file will be used instead.
|
||||
For a sample project using registry secrets with the Google Container Registry,
|
||||
check: https://github.com/balena-io-playground/sample-gcr-registry-secrets
|
||||
|
||||
If the --registry-secrets option is not specified, and a secrets.yml or
|
||||
secrets.json file exists in the balena directory (usually $HOME/.balena),
|
||||
this file will be used instead.
|
||||
|
||||
Examples:
|
||||
|
||||
@ -1598,8 +1602,12 @@ Sample registry-secrets YAML file:
|
||||
username: '_json_key'
|
||||
password: '{escaped contents of the GCR keyfile.json file}'
|
||||
|
||||
If an option is not specified, and a secrets.yml or secrets.json file exists in
|
||||
the balena directory (usually $HOME/.balena), this file will be used instead.
|
||||
For a sample project using registry secrets with the Google Container Registry,
|
||||
check: https://github.com/balena-io-playground/sample-gcr-registry-secrets
|
||||
|
||||
If the --registry-secrets option is not specified, and a secrets.yml or
|
||||
secrets.json file exists in the balena directory (usually $HOME/.balena),
|
||||
this file will be used instead.
|
||||
|
||||
Examples:
|
||||
|
||||
@ -1722,8 +1730,12 @@ Sample registry-secrets YAML file:
|
||||
username: '_json_key'
|
||||
password: '{escaped contents of the GCR keyfile.json file}'
|
||||
|
||||
If an option is not specified, and a secrets.yml or secrets.json file exists in
|
||||
the balena directory (usually $HOME/.balena), this file will be used instead.
|
||||
For a sample project using registry secrets with the Google Container Registry,
|
||||
check: https://github.com/balena-io-playground/sample-gcr-registry-secrets
|
||||
|
||||
If the --registry-secrets option is not specified, and a secrets.yml or
|
||||
secrets.json file exists in the balena directory (usually $HOME/.balena),
|
||||
this file will be used instead.
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -109,17 +109,15 @@ module.exports =
|
||||
Logger = require('../utils/logger')
|
||||
|
||||
logger = new Logger()
|
||||
|
||||
logger.logDebug('Parsing input...')
|
||||
|
||||
Promise.try ->
|
||||
# `build` accepts `[source]` as a parameter, but compose expects it
|
||||
# as an option. swap them here
|
||||
options.source ?= params.source
|
||||
delete params.source
|
||||
|
||||
validateComposeOptions(sdk, options)
|
||||
# `build` accepts `[source]` as a parameter, but compose expects it
|
||||
# as an option. swap them here
|
||||
options.source ?= params.source
|
||||
delete params.source
|
||||
|
||||
Promise.resolve(validateComposeOptions(sdk, options))
|
||||
.then ->
|
||||
{ application, arch, deviceType } = options
|
||||
|
||||
if (not (arch? and deviceType?) and not application?) or (application? and (arch? or deviceType?))
|
||||
|
@ -186,21 +186,18 @@ module.exports =
|
||||
Logger = require('../utils/logger')
|
||||
|
||||
logger = new Logger()
|
||||
|
||||
logger.logDebug('Parsing input...')
|
||||
|
||||
appName = undefined
|
||||
Promise.try ->
|
||||
# when Capitano converts a positional parameter (but not an option)
|
||||
# to a number, the original value is preserved with the _raw suffix
|
||||
{ appName, appName_raw, image } = params
|
||||
# when Capitano converts a positional parameter (but not an option)
|
||||
# to a number, the original value is preserved with the _raw suffix
|
||||
{ appName, appName_raw, image } = params
|
||||
|
||||
# look into "balena build" options if appName isn't given
|
||||
appName = appName_raw || appName || options.application
|
||||
delete options.application
|
||||
|
||||
validateComposeOptions(sdk, options)
|
||||
# look into "balena build" options if appName isn't given
|
||||
appName = appName_raw || appName || options.application
|
||||
delete options.application
|
||||
|
||||
Promise.resolve(validateComposeOptions(sdk, options))
|
||||
.then ->
|
||||
if not appName?
|
||||
throw new Error('Please specify the name of the application to deploy')
|
||||
|
||||
|
@ -45,5 +45,9 @@ Sample registry-secrets YAML file:
|
||||
username: '_json_key'
|
||||
password: '{escaped contents of the GCR keyfile.json file}'
|
||||
|
||||
If an option is not specified, and a secrets.yml or secrets.json file exists in
|
||||
the balena directory (usually $HOME/.balena), this file will be used instead.`;
|
||||
For a sample project using registry secrets with the Google Container Registry,
|
||||
check: https://github.com/balena-io-playground/sample-gcr-registry-secrets
|
||||
|
||||
If the --registry-secrets option is not specified, and a secrets.yml or
|
||||
secrets.json file exists in the balena directory (usually $HOME/.balena),
|
||||
this file will be used instead.`;
|
||||
|
Loading…
Reference in New Issue
Block a user