mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-10 14:45:45 +02:00
Add GitLab CI credentials helper (#2040)
This simplifies usage of Kaniko in GitLab CI environments and means that it's not longer necessary to manually cobble together the config with the right values from the environment in error-prone shell commands.
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
ecr "github.com/awslabs/amazon-ecr-credential-helper/ecr-login"
|
||||
"github.com/chrismellard/docker-credential-acr-env/pkg/credhelper"
|
||||
gitlab "github.com/ePirat/docker-credential-gitlabci/pkg/credhelper"
|
||||
"github.com/google/go-containerregistry/pkg/authn"
|
||||
"github.com/google/go-containerregistry/pkg/v1/google"
|
||||
)
|
||||
@@ -32,5 +33,6 @@ func GetKeychain() authn.Keychain {
|
||||
google.Keychain,
|
||||
authn.NewKeychainFromHelper(ecr.NewECRHelper(ecr.WithLogger(ioutil.Discard))),
|
||||
authn.NewKeychainFromHelper(credhelper.NewACRCredentialsHelper()),
|
||||
authn.NewKeychainFromHelper(gitlab.NewGitLabCredentialsHelper()),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user