-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from GSA-TTS/zjr/stage-common
Common Stage Base (and friends)
- Loading branch information
Showing
10 changed files
with
198 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# For simple integration test with cloudgov_integration_test.go | ||
# | ||
# This test will use the credentials provided to run `cf apps` and | ||
# check the output against what you have provided. | ||
# | ||
# 1. copy this file to `.cloudgov_creds` | ||
# 2. replace with real credentials | ||
# 3. replace with real output | ||
# 2. replace with real credentials, e.g. a service key's | ||
# 3. replace with real output from `cf apps` | ||
username-1234-asdf | ||
password-asdf-1234 | ||
I am the expected output! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package drive | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/GSA-TTS/gitlab-runner-cloudgov/runner/cfd/cloudgov" | ||
) | ||
|
||
type stage struct { | ||
// conf | ||
prep *prepStage | ||
// run | ||
// clean | ||
|
||
common commonStage | ||
} | ||
|
||
type commonStage struct { | ||
client *cloudgov.Client | ||
config *JobConfig | ||
} | ||
|
||
func newStage() (s *stage, err error) { | ||
defer func() { | ||
if err != nil { | ||
err = fmt.Errorf("error creating stage: %w", err) | ||
} | ||
}() | ||
|
||
s.common.client, err = cloudgov.New(&cloudgov.CFClientAPI{}, nil) | ||
if err != nil { | ||
return | ||
} | ||
|
||
s.common.config, err = getJobConfig() | ||
if err != nil { | ||
return | ||
} | ||
|
||
// conf | ||
s.prep = (*prepStage)(&s.common) | ||
// run | ||
// clean | ||
|
||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters