Implement some common logic for pool creation
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
72501aee0f
commit
0152b21529
15 changed files with 201 additions and 254 deletions
|
|
@ -1725,10 +1725,6 @@ func (r *basePoolManager) WebhookSecret() string {
|
|||
return r.entity.WebhookSecret
|
||||
}
|
||||
|
||||
func (r *basePoolManager) GithubRunnerRegistrationToken() (string, error) {
|
||||
return r.GetGithubRegistrationToken()
|
||||
}
|
||||
|
||||
func (r *basePoolManager) ID() string {
|
||||
return r.entity.ID
|
||||
}
|
||||
|
|
@ -2095,7 +2091,7 @@ func (r *basePoolManager) GetRunnerInfoFromWorkflow(job params.WorkflowJob) (par
|
|||
return params.RunnerInfo{}, fmt.Errorf("failed to find runner name from workflow")
|
||||
}
|
||||
|
||||
func (r *basePoolManager) GetGithubRegistrationToken() (string, error) {
|
||||
func (r *basePoolManager) GithubRunnerRegistrationToken() (string, error) {
|
||||
tk, ghResp, err := r.ghcli.CreateEntityRegistrationToken(r.ctx)
|
||||
if err != nil {
|
||||
if ghResp != nil && ghResp.StatusCode == http.StatusUnauthorized {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue