Skip to content

Commit

Permalink
ensure proxy is still deployed when cache exists
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Apr 28, 2020
1 parent 0ab12dd commit 14d5070
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/provision/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,14 +823,14 @@ func (p *provision) importAndDeployProxy(name string, proxy *apigee.Proxy, oldRe
if err != nil && (resp == nil || resp.StatusCode != http.StatusConflict) { // http.StatusConflict == already exists
return err
}
if resp.StatusCode != http.StatusCreated && resp.StatusCode != http.StatusConflict {
return fmt.Errorf("error creating cache %s, status code: %v", cacheName, resp.StatusCode)
}
if resp.StatusCode == http.StatusConflict {
printf("cache %s already exists", cacheName)
return nil
}
if resp.StatusCode != http.StatusCreated {
return fmt.Errorf("error creating cache %s, status code: %v", cache, resp.StatusCode)
} else {
printf("cache %s created", cacheName)
}
printf("cache %s created", cacheName)
}

printf("deploying proxy %s revision %d to env %s...", name, newRev, p.Env)
Expand Down

0 comments on commit 14d5070

Please sign in to comment.