Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Commit 5441bae

Browse files
authored
Merge pull request #173 from rebuy-de/fix-staging-deployment
Fix staging deployment by skipping Argo check
2 parents f8587af + 9734c93 commit 5441bae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/api/apply.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ func checkForArgoApp(project string) (bool, error) {
1515
req, _ := http.NewRequest("GET", "https://argocd.production.rebuy.cloud/api/v1/applications/"+project, nil)
1616
argoToken := os.Getenv("ARGOCD_API_TOKEN")
1717
if argoToken == "" {
18-
return true, errors.New("unable to find Argo token, please set ARGOCD_API_TOKEN")
18+
log.WithFields(log.Fields{
19+
"Project": project,
20+
}).Debug("No ArgoCD API token found - continuing deployment")
21+
return false, nil
1922
}
2023
req.AddCookie(&http.Cookie{Name: "argocd.token", Value: argoToken})
2124
res, err := http.DefaultClient.Do(req)

0 commit comments

Comments
 (0)