-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [EE] supporting buildkite as a ci_backend
- Loading branch information
Showing
30 changed files
with
2,545 additions
and
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package ci_backends | ||
|
||
import ( | ||
"fmt" | ||
"github.com/diggerhq/digger/backend/utils" | ||
"log" | ||
) | ||
|
||
type CiBackendProvider interface { | ||
GetCiBackend(options CiBackendOptions) (CiBackend, error) | ||
} | ||
|
||
type DefaultBackendProvider struct{} | ||
|
||
func (d DefaultBackendProvider) GetCiBackend(options CiBackendOptions) (CiBackend, error) { | ||
client, _, err := utils.GetGithubClient(&utils.DiggerGithubRealClientProvider{}, options.GithubInstallationId, options.RepoFullName) | ||
if err != nil { | ||
log.Printf("GetCiBackend: could not get github client: %v", err) | ||
return nil, fmt.Errorf("could not get github client: %v", err) | ||
} | ||
backend := &GithubActionCi{ | ||
Client: client, | ||
} | ||
return backend, nil | ||
} |
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
Oops, something went wrong.