mirror of
https://github.com/drone/drone-kaniko.git
synced 2026-06-16 14:49:02 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a61915964f | |||
| b826c7f408 |
@@ -12,32 +12,6 @@ pipeline:
|
||||
build: <+input>
|
||||
sparseCheckout: []
|
||||
stages:
|
||||
- stage:
|
||||
name: Manager Approval
|
||||
identifier: Manager_Approval
|
||||
description: ""
|
||||
type: Approval
|
||||
spec:
|
||||
execution:
|
||||
steps:
|
||||
- step:
|
||||
name: CI Manager Approval
|
||||
identifier: CI_Manager_Approval
|
||||
type: HarnessApproval
|
||||
timeout: 1d
|
||||
spec:
|
||||
approvalMessage: |-
|
||||
Please review the following information
|
||||
and approve the pipeline progression
|
||||
includePipelineExecutionHistory: true
|
||||
approvers:
|
||||
minimumCount: 1
|
||||
disallowPipelineExecutor: false
|
||||
userGroups:
|
||||
- CI_Manager
|
||||
isAutoRejectEnabled: false
|
||||
approverInputs: []
|
||||
tags: {}
|
||||
- parallel:
|
||||
- stage:
|
||||
name: linux-amd64
|
||||
|
||||
+11
-4
@@ -480,25 +480,32 @@ func setupAuth(tenantId, clientId, cert,
|
||||
return "", fmt.Errorf("registry must be specified")
|
||||
}
|
||||
|
||||
if noPush {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// case of client secret or cert based auth
|
||||
if clientId != "" {
|
||||
// only setup auth when pushing or credentials are defined
|
||||
|
||||
token, publicUrl, err := getACRToken(subscriptionId, tenantId, clientId, clientSecret, cert, registry)
|
||||
if err != nil {
|
||||
if noPush {
|
||||
logrus.Warnf("NO_PUSH mode: failed to fetch ACR Token: %v", err)
|
||||
return "", nil
|
||||
}
|
||||
return "", errors.Wrap(err, "failed to fetch ACR Token")
|
||||
}
|
||||
|
||||
// setup docker config for azure registry and base image docker registry
|
||||
if err := setDockerAuth(username, token, registry, dockerUsername, dockerPassword, dockerRegistry); err != nil {
|
||||
if noPush {
|
||||
logrus.Warnf("NO_PUSH mode: failed to create docker config: %v", err)
|
||||
return "", nil
|
||||
}
|
||||
return "", errors.Wrap(err, "failed to create docker config")
|
||||
}
|
||||
return publicUrl, nil
|
||||
} else {
|
||||
if noPush {
|
||||
return "", nil
|
||||
}
|
||||
return "", fmt.Errorf("managed authentication is not supported")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user