mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-08 03:50:59 +00:00
Merge pull request #1258 from balena-io/1070-remove-20-image-limit
compose: remove artificial 20 repo limit
This commit is contained in:
commit
825964fdc6
@ -390,22 +390,10 @@ getPreviousRepos = (sdk, docker, logger, appID) ->
|
|||||||
authorizePush = (sdk, logger, tokenAuthEndpoint, registry, images, previousRepos) ->
|
authorizePush = (sdk, logger, tokenAuthEndpoint, registry, images, previousRepos) ->
|
||||||
_ = require('lodash')
|
_ = require('lodash')
|
||||||
|
|
||||||
# TODO: https://github.com/balena-io/balena-cli/issues/1070
|
|
||||||
maxRepos = 20
|
|
||||||
|
|
||||||
if not _.isArray(images)
|
if not _.isArray(images)
|
||||||
images = [ images ]
|
images = [ images ]
|
||||||
|
|
||||||
if images.length > maxRepos
|
|
||||||
throw new Error (
|
|
||||||
"More than #{maxRepos} containers is currently not supported, see " +
|
|
||||||
'https://github.com/balena-io/balena-cli/issues/1070 for more information'
|
|
||||||
)
|
|
||||||
images.push previousRepos...
|
images.push previousRepos...
|
||||||
if images.length + previousRepos?.length > maxRepos
|
|
||||||
logger.logDebug("Truncating requested repositories to #{maxRepos} by limiting previously pushed repo access")
|
|
||||||
# at this point, we know we're only truncating access to previously pushed repos
|
|
||||||
images = images[0...maxRepos]
|
|
||||||
sdk.request.send
|
sdk.request.send
|
||||||
baseUrl: tokenAuthEndpoint
|
baseUrl: tokenAuthEndpoint
|
||||||
url: '/auth/v1/token'
|
url: '/auth/v1/token'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user