-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support ignoring ssl errors for self signed instances (#308)
consolidate client creation
- Loading branch information
1 parent
dc40a70
commit c7b3239
Showing
7 changed files
with
36 additions
and
71 deletions.
There are no files selected for viewing
13 changes: 3 additions & 10 deletions
13
source/tasks/BuildInformation/BuildInformationV6/buildInformation.ts
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
23 changes: 3 additions & 20 deletions
23
source/tasks/CreateOctopusRelease/CreateOctopusReleaseV6/release.ts
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
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,18 @@ | ||
import { Client, ClientConfiguration, Logger } from "@octopusdeploy/api-client"; | ||
import { getUserAgentApp } from "./pluginInformation"; | ||
import https from "https"; | ||
import { OctoServerConnectionDetails } from "./connection"; | ||
|
||
export async function getClient(connection: OctoServerConnectionDetails, logger: Logger, stepNoun: string, stepVerb: string, stepVersion: number) { | ||
const config: ClientConfiguration = { | ||
userAgentApp: getUserAgentApp(stepNoun, stepVerb, stepVersion), | ||
instanceURL: connection.url, | ||
apiKey: connection.apiKey, | ||
logging: logger, | ||
}; | ||
if (connection.ignoreSslErrors) { | ||
config.httpsAgent = new https.Agent({ rejectUnauthorized: false }); | ||
} | ||
|
||
return await Client.create(config); | ||
} |