Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 71db282

Browse files
committed
feat(cfd): pull cf api url out of vcap_application
1 parent ccdacde commit 71db282

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

runner-manager/cfd/cloudgov/cloudgov.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ func (e CloudGovClientError) Error() string {
3939
return e.msg
4040
}
4141

42-
// TODO: we should pull this out of VCAP_APPLICATION
4342
const (
4443
apiRootURLDefault = "https://api.fr-stage.cloud.gov"
4544
internalDomainGUID = "8a5d6a8c-cfc1-4fc4-afc9-aa563ff9df5e"

runner-manager/cfd/cmd/drive/stage.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@ func newStage(client *cloudgov.Client) (s *stage, err error) {
3333
s = &stage{}
3434
s.common.stage = s
3535

36+
s.common.config, err = getJobConfig()
37+
if err != nil {
38+
return
39+
}
40+
3641
if client != nil {
3742
s.common.client = client
3843
} else {
39-
s.common.client, err = cloudgov.New(&cloudgov.CFClientAPI{}, nil)
44+
s.common.client, err = cloudgov.New(
45+
&cloudgov.CFClientAPI{},
46+
&cloudgov.Opts{APIRootURL: s.common.config.CFApi},
47+
)
4048
if err != nil {
4149
return
4250
}
4351
}
4452

45-
s.common.config, err = getJobConfig()
46-
if err != nil {
47-
return
48-
}
49-
5053
// conf
5154
s.prep = (*prepStage)(&s.common)
5255
// run

0 commit comments

Comments
 (0)