Skip to content

add github.url and github.api_url for ghes alpha#386

Merged
ericsciple merged 1 commit intomasterfrom
users/ericsciple/m168alpha
Mar 25, 2020
Merged

add github.url and github.api_url for ghes alpha#386
ericsciple merged 1 commit intomasterfrom
users/ericsciple/m168alpha

Conversation

@ericsciple
Copy link
Collaborator

@ericsciple ericsciple commented Mar 25, 2020

For GHES alpha release, expose GHES server URL and API URL for actions (e.g. where checkout should clone from)

@ericsciple ericsciple requested a review from TingluoHuang March 25, 2020 05:08
// Temporary hack for GHES alpha
var configurationStore = HostContext.GetService<IConfigurationStore>();
var runnerSettings = configurationStore.GetSettings();
if (!runnerSettings.IsHostedServer && !string.IsNullOrEmpty(runnerSettings.GitHubUrl))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be string.IsNullOrEmpty(runnerSettings.GitHubUrl). This will be non-null if you're talking to hosted GitHub -- see where this is set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, is that supposed to be an || in the middle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@TingluoHuang when !runnerSettings.IsHostedServer should we fallback to runnerSettings.ServerUrl when GitHubUrl is not defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runnerSettings.ServerUrl is the pipelines url, pipelines.actions.githubusercontent.com/xxxxx

When GitHubUrl is not defined, it means we connected to Devfabric.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i think the change here might be fine then, but additional change to figure out for registration against the appliance

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed offline w/ ting, leaving this way for now. When config against appliance works, will need an additional change to persist githuburl for that scenario.

@ericsciple ericsciple merged commit e23d68f into master Mar 25, 2020
@ericsciple ericsciple deleted the users/ericsciple/m168alpha branch March 25, 2020 19:12
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants