Skip to content

Commit

Permalink
Replace azure-arm-rest-v2 with azure-arm-rest. Part 5 (#18637)
Browse files Browse the repository at this point in the history
* Replace azure-arm-rest-v2 in KubernetesV1

* Replace azure-arm-rest-v2 in KubeloginInstallerV0

* Replace azure-arm-rest-v2 in AzureMysqlDeploymentV1

* Replace azure-arm-rest-v2 in AzureFunctionOnKubernetesV1

* Replace azure-arm-rest-v2 in AzureRmWebAppDeploymentV4

* Replace azure-arm-rest-v2 in JavaToolInstallerV0

* Replace azure-arm-rest-v2 in AzurePowerShellV5

* Replace azure-arm-rest-v2 in JenkinsDownloadArtifactsV1
  • Loading branch information
Maxim Zaytsev authored Jul 14, 2023
1 parent 2fb2399 commit 8e2986c
Show file tree
Hide file tree
Showing 80 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV1/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"items": [
"node_modules/azure-pipelines-tasks-docker-common/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-kubernetes-common/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-azure-arm-rest-v2/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib"
],
"options": "-Rf"
Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzureFunctionOnKubernetesV1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/q": "^1.5.0",
"@types/uuid": "^9.0.0",
"azure-pipelines-task-lib": "^3.1.0",
"azure-pipelines-tasks-azure-arm-rest-v2": "^3.223.4",
"azure-pipelines-tasks-azure-arm-rest": "3.223.4",
"azure-pipelines-tasks-docker-common": "^2.211.0",
"azure-pipelines-tasks-kubernetes-common": "^2.224.1",
"azure-pipelines-tool-lib": "^2.0.0-preview",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

import tl = require('azure-pipelines-task-lib/task');
import { AzureAksService } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-aks-service';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureEndpoint, AKSClusterAccessProfile} from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { AzureAksService } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-aks-service';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
import { AzureEndpoint, AKSClusterAccessProfile} from 'azure-pipelines-tasks-azure-arm-rest/azureModels';

// get kubeconfig file content
async function getKubeConfigFromAKS(azureSubscriptionEndpoint: string, resourceGroup: string, clusterName: string, useClusterAdmin?: boolean) : Promise<string> {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 225,
"Patch": 0
"Patch": 1
},
"demands": [],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFunctionOnKubernetesV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 1,
"Minor": 225,
"Patch": 0
"Patch": 1
},
"demands": [],
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureMysqlDeploymentV1/Tests/mock_utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azureModels';
import * as querystring from "querystring";
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
export var nock = require('nock');
import { FirewallRule, FirewallAddressRange } from '../models/Firewall';

Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzureMysqlDeploymentV1/azuremysqldeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { MysqlServerOperations } from './operations/MysqlServerOperations';
import { ToolPathOperations } from './operations/ToolPathOperations';
import { ISqlClient } from './sql/ISqlClient';
import { MysqlClient } from './sql/MysqlClient';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';

async function run() {
let azureMysqlTaskParameter: AzureMysqlTaskParameter;
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"rm": [
{
"items": [
"node_modules/azure-pipelines-tasks-azure-arm-rest-v2/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-webdeployment-common/node_modules/azure-pipelines-task-lib"
],
"options": "-Rf"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureMysqlDeploymentV1/operations/FirewallOperations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import task = require('azure-pipelines-task-lib/task');
import { ApplicationTokenCredentials} from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { AzureMysqlManagementClient } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-mysql';
import { ApplicationTokenCredentials} from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
import { AzureMysqlManagementClient } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-mysql';
import { FirewallRule, FirewallAddressRange } from '../models/Firewall';
import { MysqlServer } from '../models/MysqlServer';
import { AzureMysqlTaskParameter } from '../models/AzureMysqlTaskParameter';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import task = require('azure-pipelines-task-lib/task');
import { AzureMysqlManagementClient } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-mysql';
import { AzureMysqlManagementClient } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-mysql';
import { AzureMysqlTaskParameter } from '../models/AzureMysqlTaskParameter';
import { ApplicationTokenCredentials} from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { ApplicationTokenCredentials} from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
import { MysqlServer } from '../models/MysqlServer';
import Q = require('q');

Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzureMysqlDeploymentV1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/node": "^10.17.0",
"@types/q": "1.0.7",
"azure-pipelines-task-lib": "^3.4.0",
"azure-pipelines-tasks-azure-arm-rest-v2": "^3.223.4",
"azure-pipelines-tasks-azure-arm-rest": "3.223.4",
"azure-pipelines-tasks-webdeployment-common": "^4.222.0",
"compress-commons": "1.1.0",
"crc32-stream": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 225,
"Patch": 0
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "1.100.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureMysqlDeploymentV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 225,
"Patch": 0
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "1.100.0",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/azurepowershell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os = require('os');
import tl = require('azure-pipelines-task-lib/task');
import tr = require('azure-pipelines-task-lib/toolrunner');

import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
var uuidV4 = require('uuid/v4');

function convertToNullIfUndefined<T>(arg: T): T|null {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"rm": [
{
"items": [
"node_modules/azure-pipelines-tasks-azure-arm-rest-v2/node_modules/azure-pipelines-task-lib"
"node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib"
],
"options": "-Rf"
}
Expand Down
6 changes: 3 additions & 3 deletions Tasks/AzurePowerShellV5/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/node": "^10.17.0",
"@types/q": "1.0.7",
"azure-pipelines-task-lib": "3.1.10",
"azure-pipelines-tasks-azure-arm-rest-v2": "^3.224.0",
"azure-pipelines-tasks-azure-arm-rest": "3.224.0",
"azure-pipelines-tasks-utility-common": "^3.0.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 225,
"Patch": 1
"Patch": 2
},
"releaseNotes": "Added support for Az Module and cross platform agents.",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShellV5/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"version": {
"Major": 5,
"Minor": 225,
"Patch": 1
"Patch": 2
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"groups": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IWebAppDeploymentProvider } from '../deploymentProvider/IWebAppDeployme
import { TaskParametersUtility, TaskParameters, DeploymentType } from '../operations/TaskParameters';
import { stringify } from 'querystring';
import { PackageType } from 'azure-pipelines-tasks-webdeployment-common/packageUtility';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/mock_utils';
import { mockAzureARMPreDeploymentSteps } from "./mock_utils";

getMockEndpoint();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import ma = require('azure-pipelines-task-lib/mock-answer');
import * as path from 'path';
import { AzureResourceFilterUtility } from '../operations/AzureResourceFilterUtility';
import { KuduServiceUtility } from '../operations/KuduServiceUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
import { setEndpointData, setAgentsData, mockTaskArgument, mockTaskInputParameters } from './utils';

export class AzureRmWebAppDeploymentProviderTests {
Expand All @@ -31,7 +31,7 @@ export class AzureRmWebAppDeploymentProviderTests {
}
};

tr.registerMock('azure-pipelines-tasks-azure-arm-rest-v2/azureAppServiceUtility', {
tr.registerMock('azure-pipelines-tasks-azure-arm-rest/azureAppServiceUtility', {
AzureAppServiceUtility: function(_) {
return utility;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IWebAppDeploymentProvider } from '../deploymentProvider/IWebAppDeployme
import { TaskParametersUtility, TaskParameters, DeploymentType } from '../operations/TaskParameters';
import { stringify } from 'querystring';
import { PackageType } from 'azure-pipelines-tasks-webdeployment-common/packageUtility';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/mock_utils';
import { mockAzureARMPreDeploymentSteps, mockLinuxAppSettings } from "./mock_utils";

getMockEndpoint();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import ma = require('azure-pipelines-task-lib/mock-answer');
import * as path from 'path';
import { AzureResourceFilterUtility } from '../operations/AzureResourceFilterUtility';
import { KuduServiceUtility } from '../operations/KuduServiceUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
import { setEndpointData, setAgentsData, mockTaskArgument, mockTaskInputParameters } from './utils';

export class BuiltInLinuxWebAppDeploymentProviderTests {
Expand Down Expand Up @@ -47,7 +47,7 @@ export class BuiltInLinuxWebAppDeploymentProviderTests {
}
};

tr.registerMock('azure-pipelines-tasks-azure-arm-rest-v2/azureAppServiceUtility', {
tr.registerMock('azure-pipelines-tasks-azure-arm-rest/azureAppServiceUtility', {
AzureAppServiceUtility: function(_) {
return utility;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IWebAppDeploymentProvider } from '../deploymentProvider/IWebAppDeployme
import { TaskParametersUtility, TaskParameters, DeploymentType } from '../operations/TaskParameters';
import { stringify } from 'querystring';
import { PackageType } from 'azure-pipelines-tasks-webdeployment-common/packageUtility';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/mock_utils';
import { mockAzureARMPreDeploymentSteps, mockContainerDeploySettings } from "./mock_utils";

getMockEndpoint();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import ma = require('azure-pipelines-task-lib/mock-answer');
import * as path from 'path';
import { AzureResourceFilterUtility } from '../operations/AzureResourceFilterUtility';
import { KuduServiceUtility } from '../operations/KuduServiceUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint';
import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azureModels';
import { ApplicationTokenCredentials } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-common';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint';
import { setEndpointData, setAgentsData, mockTaskArgument, mockTaskInputParameters } from './utils';

export class ContainerWebAppDeploymentProviderTests {
Expand Down Expand Up @@ -34,7 +34,7 @@ export class ContainerWebAppDeploymentProviderTests {
}
};

tr.registerMock('azure-pipelines-tasks-azure-arm-rest-v2/azureAppServiceUtility', {
tr.registerMock('azure-pipelines-tasks-azure-arm-rest/azureAppServiceUtility', {
AzureAppServiceUtility: function(_) {
return utility;
}
Expand Down
12 changes: 6 additions & 6 deletions Tasks/AzureRmWebAppDeploymentV4/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import tl = require('azure-pipelines-task-lib');
var ltx = require('ltx');
import fs = require('fs');

var AppServiceTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/L0-azure-arm-app-service.js");
var KuduServiceTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/L0-azure-arm-app-service-kudu-tests.js");
var ApplicationInsightsTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/L0-azure-arm-appinsights-tests.js");
var ResourcesTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/L0-azure-arm-resource-tests.js");
var AppServiceTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/L0-azure-arm-app-service.js");
var KuduServiceTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/L0-azure-arm-app-service-kudu-tests.js");
var ApplicationInsightsTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/L0-azure-arm-appinsights-tests.js");
var ResourcesTests = require("../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/L0-azure-arm-resource-tests.js");
var fileEncoding = require("../node_modules/azure-pipelines-tasks-webdeployment-common/fileencoding.js");

describe('AzureRmWebAppDeployment Suite', function() {

this.timeout(60000);

before((done) => {
if(!tl.exist(path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/node_modules'))) {
tl.cp(path.join( __dirname, 'node_modules'), path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests'), '-rf', true);
if(!tl.exist(path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/node_modules'))) {
tl.cp(path.join( __dirname, 'node_modules'), path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azure-arm-rest/Tests'), '-rf', true);
}

tl.cp(path.join(__dirname, "..", "node_modules", "azure-pipelines-tasks-webdeployment-common", "Tests", 'L1XmlVarSub', 'Web.config'), path.join(__dirname, "..", "node_modules", "azure-pipelines-tasks-webdeployment-common", "Tests", 'L1XmlVarSub', 'Web_test.config'), '-f', false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IWebAppDeploymentProvider } from '../deploymentProvider/IWebAppDeployme
import { TaskParametersUtility, TaskParameters, DeploymentType } from '../operations/TaskParameters';
import { stringify } from 'querystring';
import { PackageType } from 'azure-pipelines-tasks-webdeployment-common/packageUtility';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azure-arm-rest/Tests/mock_utils';
import { mockAzureARMPreDeploymentSteps, mockRunFromZipSettings } from "./mock_utils";

getMockEndpoint();
Expand Down
Loading

0 comments on commit 8e2986c

Please sign in to comment.