Added proxy support for azure agent and github runner
This commit is contained in:
@@ -4,6 +4,7 @@ import * as taskLib from 'azure-pipelines-task-lib/task'
|
||||
import * as toolLib from 'azure-pipelines-tool-lib/tool'
|
||||
|
||||
import { IBuildAgent, IExecResult } from '../../core/models'
|
||||
import { IRequestOptions } from 'typed-rest-client/Interfaces'
|
||||
|
||||
@injectable()
|
||||
class BuildAgent implements IBuildAgent {
|
||||
@@ -11,6 +12,14 @@ class BuildAgent implements IBuildAgent {
|
||||
return 'Azure Pipelines'
|
||||
}
|
||||
|
||||
public proxyConfiguration(url: string): IRequestOptions {
|
||||
return {
|
||||
proxy: taskLib.getHttpProxyConfiguration(url),
|
||||
cert: taskLib.getHttpCertConfiguration(),
|
||||
ignoreSslError: !!taskLib.getVariable('Agent.SkipCertValidation')
|
||||
}
|
||||
}
|
||||
|
||||
public find(toolName: string, versionSpec: string, arch?: string): string {
|
||||
return toolLib.findLocalTool(toolName, versionSpec, arch)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user