mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deb78bee2b | ||
|
|
0df14e308f | ||
|
|
ca0c27b734 |
4632
lib/cleanup/index.js
Normal file
4632
lib/cleanup/index.js
Normal file
File diff suppressed because it is too large
Load Diff
4911
lib/main/index.js
Normal file
4911
lib/main/index.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ export class AzureCliLogin {
|
|||||||
await this.executeAzCliCommand(["version"], true, execOptions);
|
await this.executeAzCliCommand(["version"], true, execOptions);
|
||||||
core.debug(`Azure CLI version used:\n${output}`);
|
core.debug(`Azure CLI version used:\n${output}`);
|
||||||
|
|
||||||
this.setAzurestackEnvIfNecessary();
|
await this.registerAzurestackEnvIfNecessary();
|
||||||
|
|
||||||
await this.executeAzCliCommand(["cloud", "set", "-n", this.loginConfig.environment], false);
|
await this.executeAzCliCommand(["cloud", "set", "-n", this.loginConfig.environment], false);
|
||||||
core.info(`Done setting cloud: "${this.loginConfig.environment}"`);
|
core.info(`Done setting cloud: "${this.loginConfig.environment}"`);
|
||||||
@@ -59,7 +59,7 @@ export class AzureCliLogin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async setAzurestackEnvIfNecessary() {
|
async registerAzurestackEnvIfNecessary() {
|
||||||
if (this.loginConfig.environment != "azurestack") {
|
if (this.loginConfig.environment != "azurestack") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ export class AzureCliLogin {
|
|||||||
let suffixKeyvault = ".vault" + baseUri.substring(baseUri.indexOf('.')); // keyvault suffix starts with .
|
let suffixKeyvault = ".vault" + baseUri.substring(baseUri.indexOf('.')); // keyvault suffix starts with .
|
||||||
let suffixStorage = baseUri.substring(baseUri.indexOf('.') + 1); // storage suffix starts without .
|
let suffixStorage = baseUri.substring(baseUri.indexOf('.') + 1); // storage suffix starts without .
|
||||||
let profileVersion = "2019-03-01-hybrid";
|
let profileVersion = "2019-03-01-hybrid";
|
||||||
await this.executeAzCliCommand(["cloud", "register", "-n", this.loginConfig.environment, "--endpoint-resource-manager", `"${this.loginConfig.resourceManagerEndpointUrl}"`, "--suffix-keyvault-dns", `"${suffixKeyvault}"`, "--suffix-storage-endpoint", `"${suffixStorage}"`, "--profile", `"${profileVersion}"`], false);
|
await this.executeAzCliCommand(["cloud", "register", "-n", this.loginConfig.environment, "--endpoint-resource-manager", this.loginConfig.resourceManagerEndpointUrl, "--suffix-keyvault-dns", suffixKeyvault, "--suffix-storage-endpoint", suffixStorage, "--profile", profileVersion], false);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.error(`Error while trying to register cloud "${this.loginConfig.environment}"`);
|
core.error(`Error while trying to register cloud "${this.loginConfig.environment}"`);
|
||||||
|
|||||||
Reference in New Issue
Block a user