Merge pull request #1534 from grouville/reconcile-auth
Reconcile docker.#Push.auth and engine.#Push.auth
This commit is contained in:
@@ -14,11 +14,10 @@ package engine
|
||||
config: #ImageConfig
|
||||
|
||||
// Authentication
|
||||
auth: [...{
|
||||
target: string
|
||||
auth?: {
|
||||
username: string
|
||||
secret: string | #Secret
|
||||
}]
|
||||
secret: #Secret
|
||||
}
|
||||
|
||||
// Complete ref of the pushed image, including digest
|
||||
result: #Ref
|
||||
@@ -68,11 +67,10 @@ package engine
|
||||
source: #Ref
|
||||
|
||||
// Authentication
|
||||
auth: [...{
|
||||
target: string
|
||||
auth?: {
|
||||
username: string
|
||||
secret: string | #Secret
|
||||
}]
|
||||
secret: #Secret
|
||||
}
|
||||
|
||||
// Root filesystem of downloaded image
|
||||
output: #FS
|
||||
@@ -98,11 +96,10 @@ package engine
|
||||
}
|
||||
|
||||
// Authentication
|
||||
auth: [...{
|
||||
target: string
|
||||
auth: [registry=string]: {
|
||||
username: string
|
||||
secret: string | #Secret
|
||||
}]
|
||||
secret: #Secret
|
||||
}
|
||||
|
||||
platforms?: [...string]
|
||||
target?: string
|
||||
|
@@ -12,18 +12,16 @@ import (
|
||||
source: #Ref
|
||||
|
||||
// Registry authentication
|
||||
// Key must be registry address, for example "index.docker.io"
|
||||
auth: [registry=string]: {
|
||||
auth?: {
|
||||
username: string
|
||||
secret: dagger.#Secret
|
||||
}
|
||||
|
||||
_op: engine.#Pull & {
|
||||
"source": source
|
||||
"auth": [ for target, creds in auth {
|
||||
"target": target
|
||||
creds
|
||||
}]
|
||||
if auth != _|_ {
|
||||
"auth": auth
|
||||
}
|
||||
}
|
||||
|
||||
// Downloaded image
|
||||
|
@@ -14,8 +14,7 @@ import (
|
||||
result: #Ref & _push.result
|
||||
|
||||
// Registry authentication
|
||||
// Key must be registry address
|
||||
auth: [registry=string]: {
|
||||
auth?: {
|
||||
username: string
|
||||
secret: dagger.#Secret
|
||||
}
|
||||
@@ -25,10 +24,9 @@ import (
|
||||
|
||||
_push: engine.#Push & {
|
||||
"dest": dest
|
||||
"auth": [ for target, creds in auth {
|
||||
"target": target
|
||||
creds
|
||||
}]
|
||||
if auth != _|_ {
|
||||
"auth": auth
|
||||
}
|
||||
input: image.rootfs
|
||||
config: image.config
|
||||
}
|
||||
|
Reference in New Issue
Block a user