Skip to content

Commit

Permalink
Merge pull request #769 from JohnVillalovos/jlvillal/debug_tokens
Browse files Browse the repository at this point in the history
Add debug level log messages when Gitlab CI tokens are loaded
  • Loading branch information
bmeneg authored Dec 13, 2021
2 parents 855e10d + f179334 commit 9966451
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,14 @@ func CI() (string, string, string) {
if ciToken == "" {
return "", "", ""
}
log.Debugln("Loaded CI_JOB_TOKEN environment variable")
ciHost := strings.TrimSuffix(os.Getenv("CI_PROJECT_URL"), os.Getenv("CI_PROJECT_PATH"))
if ciHost == "" {
return "", "", ""
}
log.Debugln("Parsed CI_PROJECT_URL environment variable:", ciHost)
ciUser := os.Getenv("GITLAB_USER_LOGIN")
log.Debugln("Loaded GITLAB_USER_LOGIN environment variable:", ciUser)

return ciHost, ciUser, ciToken
}
Expand Down

0 comments on commit 9966451

Please sign in to comment.