Skip to content

Commit

Permalink
Merge pull request #22 from buildtool/gitlab-auth
Browse files Browse the repository at this point in the history
fix: use correct env-property for Gitlab token
  • Loading branch information
peter-svensson authored Nov 27, 2019
2 parents c80a455 + 780b633 commit 9b5d1c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/config/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func TestGitlab_Identify(t *testing.T) {
assert.NoError(t, err)
registry := cfg.CurrentRegistry()
assert.Equal(t, "registry.gitlab.com/group", registry.RegistryUrl())
assert.Equal(t, "eyJ1c2VybmFtZSI6ImdpdGxhYi1jaS10b2tlbiIsInBhc3N3b3JkIjoidG9rZW4iLCJzZXJ2ZXJhZGRyZXNzIjoicmVnaXN0cnkuZ2l0bGFiLmNvbSJ9", registry.GetAuthInfo())
assert.Equal(t, "", out.String())
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Gitlab struct {
dockerRegistry
Registry string `yaml:"registry" env:"CI_REGISTRY"`
Repository string `yaml:"repository" env:"CI_REGISTRY_IMAGE"`
Token string `yaml:"token" env:"CI_TOKEN"`
Token string `yaml:"token" env:"CI_BUILD_TOKEN"`
}

var _ Registry = &Gitlab{}
Expand Down

0 comments on commit 9b5d1c5

Please sign in to comment.