diff --git a/Tasks/AzureSpringCloudV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureSpringCloudV0/Strings/resources.resjson/en-US/resources.resjson index 96a6e80d8f25..b7dd88c0cd3e 100644 --- a/Tasks/AzureSpringCloudV0/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureSpringCloudV0/Strings/resources.resjson/en-US/resources.resjson @@ -1,17 +1,17 @@ { - "loc.friendlyName": "Azure Spring Cloud", - "loc.helpMarkDown": "[Learn more about this task](https://aka.ms/azurespringcloud)", - "loc.description": "Deploy applications to Azure Spring Cloud and manage deployments.", - "loc.instanceNameFormat": "Azure Spring Cloud $(Action): $(AppName)", + "loc.friendlyName": "Azure Spring Apps", + "loc.helpMarkDown": "[Learn more about this task](https://aka.ms/azurespringapps)", + "loc.description": "Deploy applications to Azure Spring Apps and manage deployments.", + "loc.instanceNameFormat": "Azure Spring Apps $(Action): $(AppName)", "loc.group.displayName.ApplicationAndConfigurationSettings": "Application and Configuration Settings", "loc.input.label.ConnectedServiceName": "Azure subscription", "loc.input.help.ConnectedServiceName": "Select the Azure Resource Manager subscription for the deployment.", "loc.input.label.Action": "Action", - "loc.input.help.Action": "Action to be performed on Azure Spring Cloud.", - "loc.input.label.AzureSpringCloud": "Azure Spring Cloud Name", - "loc.input.help.AzureSpringCloud": "Select the Azure Spring Cloud service to which to deploy.", + "loc.input.help.Action": "Action to be performed on Azure Spring Apps.", + "loc.input.label.AzureSpringCloud": "Azure Spring Apps Name", + "loc.input.help.AzureSpringCloud": "Select the Azure Spring Apps service to which to deploy.", "loc.input.label.AppName": "App", - "loc.input.help.AppName": "Select the Azure Spring Cloud app to deploy.", + "loc.input.help.AppName": "Select the Azure Spring Apps app to deploy.", "loc.input.label.DeploymentType": "Deployment Type", "loc.input.help.DeploymentType": "To deploy with source code or Java package, choose \"Artifacts\"; To deploy with container image, choose \"Custom Container\"", "loc.input.label.UseStagingDeployment": "Use Staging Deployment", @@ -21,9 +21,9 @@ "loc.input.label.DeploymentName": "Deployment", "loc.input.help.DeploymentName": "The deployment to which this task will apply. Lowercase letters and numbers only; must start with a letter.", "loc.input.label.Package": "Package or folder", - "loc.input.help.Package": "File path to the package or a folder containing the Spring Cloud app contents.
Variables ( [Build](https://docs.microsoft.com/vsts/pipelines/build/variables) | [Release](https://docs.microsoft.com/vsts/pipelines/release/variables#default-variables)), wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\\*\\*/\\*.jar.", + "loc.input.help.Package": "File path to the package or a folder containing the Spring Apps app contents.
Variables ( [Build](https://docs.microsoft.com/vsts/pipelines/build/variables) | [Release](https://docs.microsoft.com/vsts/pipelines/release/variables#default-variables)), wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\\*\\*/\\*.jar.", "loc.input.label.Builder": "Builder", - "loc.input.help.Builder": "Select a builder of VMware Tanzu® Build Service™, this can be used in enterprise tier.
For detailed description, please check [Use Tanzu Build Service](https://docs.microsoft.com/en-us/azure/spring-cloud/how-to-enterprise-build-service?tabs=azure-portal).", + "loc.input.help.Builder": "Select a builder of VMware Tanzu® Build Service™, this can be used in enterprise tier.
For detailed description, please check [Use Tanzu Build Service](https://docs.microsoft.com/en-us/azure/spring-apps/how-to-enterprise-build-service?tabs=azure-portal).", "loc.input.label.RegistryServer": "Registry Server", "loc.input.help.RegistryServer": "The registry of the container image. Default: docker.io.", "loc.input.label.RegistryUsername": "Registry Username", @@ -52,7 +52,7 @@ "loc.messages.StartingUploadOf": "Starting upload of %s", "loc.messages.CompletedUploadOf": "Upload of %s completed.", "loc.messages.ResourceDoesntExist": "Resource '%s' doesn't exist. Resource should exist before deployment.", - "loc.messages.UnableToGetDeploymentUrl": "Unable to get deployment URL for Azure Spring Cloud '%s', Error: '%s'", + "loc.messages.UnableToGetDeploymentUrl": "Unable to get deployment URL for Azure Spring Apps '%s', Error: '%s'", "loc.messages.DeploymentDoesntExist": "Deployment with name '%s' does not exist. Unable to proceed.", "loc.messages.StagingDeploymentWithNameDoesntExist": "Staging deployment with name %s does not exist. Unable to proceed.", "loc.messages.NoStagingDeploymentFound": "No staging deployment found.", @@ -66,8 +66,8 @@ "loc.messages.UnableToRetrieveTestEndpointKeys": "Unable to retrieve test endpoint keys", "loc.messages.NoDeploymentsExist": "No deployments exist.", "loc.messages.UnableToGetDeploymentInformation": "Unable to get deployment information.", - "loc.messages.DuplicateAzureSpringCloudName": "Illegal state: multiple Azure Spring Cloud instances with same name.", - "loc.messages.InvalidAzureSpringCloudResourceId": "Invalid azure spring cloud resource identifier: %s", + "loc.messages.DuplicateAzureSpringAppsName": "Illegal state: multiple Azure Spring Apps instances with same name.", + "loc.messages.InvalidAzureSpringAppsResourceId": "Invalid Azure Spring Apps resource identifier: %s", "loc.messages.Nopackagefoundwithspecifiedpattern": "No package found with specified pattern: %s. Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.", "loc.messages.MorethanonepackagematchedwithspecifiedpatternPleaserestrainthesearchpattern": "More than one package matched with specified pattern: %s. Please restrain the search pattern." } \ No newline at end of file diff --git a/Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudDeploymentProviderUnitTests.ts b/Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsDeploymentProviderUnitTests.ts similarity index 69% rename from Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudDeploymentProviderUnitTests.ts rename to Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsDeploymentProviderUnitTests.ts index ee318e8265a8..f45d91a662f8 100644 --- a/Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudDeploymentProviderUnitTests.ts +++ b/Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsDeploymentProviderUnitTests.ts @@ -1,24 +1,24 @@ import assert = require('assert'); -import { AzureSpringCloudDeploymentProvider } from "../deploymentProvider/AzureSpringCloudDeploymentProvider" +import { AzureSpringAppsDeploymentProvider } from "../deploymentProvider/AzureSpringAppsDeploymentProvider" import { TaskParameters } from "../operations/taskparameters" -export class AzureSpringCloudUnitTests { +export class AzureSpringAppsUnitTests { public static pathTraversalAttackTest = (done: Mocha.Done) => { const resourceIdWithPathAttack = '/subscriptions/mocksubid/resourceGroups/mockresouorcegroup/providers/Microsoft.AppPlatform/Spring/authorized-name/../unauthorized-name'; const taskParameters: TaskParameters = { - AzureSpringCloud: resourceIdWithPathAttack, + AzureSpringApps: resourceIdWithPathAttack, AppName: 'appName', UseStagingDeployment: false, Action: 'Deploy' }; - const provider = new AzureSpringCloudDeploymentProvider(taskParameters); + const provider = new AzureSpringAppsDeploymentProvider(taskParameters); provider.PreDeploymentStep().then(() => { done(assert.fail('Attempted path traversal attack should have failed')); }).catch(error => { - assert.strictEqual(error.message, `loc_mock_InvalidAzureSpringCloudResourceId ${resourceIdWithPathAttack}`); + assert.strictEqual(error.message, `loc_mock_InvalidAzureSpringAppsResourceId ${resourceIdWithPathAttack}`); done(); }); } diff --git a/Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudUnitTests.ts b/Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsUnitTests.ts similarity index 79% rename from Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudUnitTests.ts rename to Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsUnitTests.ts index 279fa58a7d46..a2dd069b2e30 100644 --- a/Tasks/AzureSpringCloudV0/Tests/AzureSpringCloudUnitTests.ts +++ b/Tasks/AzureSpringCloudV0/Tests/AzureSpringAppsUnitTests.ts @@ -1,10 +1,10 @@ import { AzureEndpoint } from "azure-pipelines-tasks-azure-arm-rest-v2/azureModels"; -import { getMockEndpoint, nock } from '../node_modules/azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils'; +import { getMockEndpoint, nock } from 'azure-pipelines-tasks-azure-arm-rest-v2/Tests/mock_utils'; import { MOCK_RESOURCE_GROUP_NAME, API_VERSION } from "./mock_utils"; import assert = require('assert'); -export class AzureSpringCloudUnitTests { +export class AzureSpringAppsUnitTests { static readonly AZURE_ENDPOINT: AzureEndpoint = getMockEndpoint(); @@ -12,12 +12,12 @@ export class AzureSpringCloudUnitTests { * Tests that deployment names are parsed correctly from API output. */ public static testDeploymentNameRetrieval = (done: Mocha.Done) => { - let azureSpringCloudName = 'testDeploymentNameRetrieval'; + let azureSpringAppsName = 'testDeploymentNameRetrieval'; let appName = 'testapp'; - let azureSpringCloud = AzureSpringCloudUnitTests.newAzureSpringCloud(azureSpringCloudName); - AzureSpringCloudUnitTests.mockDeploymentListApiWithTwoDeployments(azureSpringCloudName, appName); + let azureSpringApps = AzureSpringAppsUnitTests.newAzureSpringApps(azureSpringAppsName); + AzureSpringAppsUnitTests.mockDeploymentListApiWithTwoDeployments(azureSpringAppsName, appName); let expectedDeploymentNames = ['default', 'theOtherOne']; - azureSpringCloud.getAllDeploymentNames(appName) + azureSpringApps.getAllDeploymentNames(appName) .then(foundDeploymentNames => { assert.deepStrictEqual(foundDeploymentNames, expectedDeploymentNames); done(); @@ -25,21 +25,21 @@ export class AzureSpringCloudUnitTests { .catch(error => done(error)); } - /** Prepares an instance of the AzureSpringCloudWrapper with a mock endpoint */ - private static newAzureSpringCloud(name: string) { - let asc = require('../deploymentProvider/azure-arm-spring-cloud'); - let azureSpringCloud = new asc.AzureSpringCloud(this.AZURE_ENDPOINT, `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${MOCK_RESOURCE_GROUP_NAME}/providers/Microsoft.AppPlatform/Spring/${name}`) - return azureSpringCloud; + /** Prepares an instance of the AzureSpringAppsWrapper with a mock endpoint */ + private static newAzureSpringApps(name: string) { + let asa = require('../deploymentProvider/azure-arm-spring-apps'); + let azureSpringApps = new asa.AzureSpringApps(this.AZURE_ENDPOINT, `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${MOCK_RESOURCE_GROUP_NAME}/providers/Microsoft.AppPlatform/Spring/${name}`) + return azureSpringApps; } - private static mockDeploymentListApiWithTwoDeployments(azureSpringCloudName: string, appName: string) { + private static mockDeploymentListApiWithTwoDeployments(azureSpringAppsName: string, appName: string) { console.log('mockDeploymentListApiWithTwoDeployments'); - nock('https://management.azure.com').get(`/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringCloudName}/apps/${appName}/deployments?api-version=${API_VERSION}`) + nock('https://management.azure.com').get(`/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringAppsName}/apps/${appName}/deployments?api-version=${API_VERSION}`) .reply(200, { "value": [ { - "id": `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringCloudName}/apps/${appName}/deployments/default`, + "id": `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringAppsName}/apps/${appName}/deployments/default`, "name": "default", "properties": { "active": true, @@ -74,7 +74,7 @@ export class AzureSpringCloudUnitTests { "type": `providers/Microsoft.AppPlatform/Spring/apps/deployments` }, { - "id": `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringCloudName}/apps/${appName}/deployments/theOtherOne`, + "id": `/subscriptions/${this.AZURE_ENDPOINT.subscriptionID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${azureSpringAppsName}/apps/${appName}/deployments/theOtherOne`, "name": "theOtherOne", "properties": { "active": true, diff --git a/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0.ts b/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0.ts index fa2f95b7236b..05ecdc3c4c1f 100644 --- a/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringCloudExists, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringAppsExists, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME, MOCK_SUBSCRIPTION_ID } from './mock_utils' const TEST_APP_NAME = 'testapp'; @@ -11,12 +11,12 @@ export class CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockDeploymentListApiWithTwoDeployments(); taskMockRunner.setAnswers(mockTaskArgument()); taskMockRunner.run(); diff --git a/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsWhenTwoDeploymentsExistL0.ts b/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsWhenTwoDeploymentsExistL0.ts index 8aa3a4a5ef72..bcfd0e113e10 100644 --- a/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsWhenTwoDeploymentsExistL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/CreateNamedDeploymentFailsWhenTwoDeploymentsExistL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringCloudExists, printTaskInputs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringAppsExists, printTaskInputs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME, MOCK_SUBSCRIPTION_ID } from './mock_utils' const TEST_APP_NAME = 'testapp'; @@ -11,12 +11,12 @@ export class CreateNamedDeploymentFailsWhenTwoDeploymentsExistL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockDeploymentListApiWithTwoDeployments(); taskMockRunner.setAnswers(mockTaskArgument()); taskMockRunner.run(); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeleteDeploymentFailsWhenNoStagingDeploymentL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeleteDeploymentFailsWhenNoStagingDeploymentL0.ts index 0b0b0a6bc027..3f36362ab99d 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeleteDeploymentFailsWhenNoStagingDeploymentL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeleteDeploymentFailsWhenNoStagingDeploymentL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -12,12 +12,12 @@ export class DeleteStagingDeploymentTestL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockSingleDeployment(); this.mockDeploymentDeleteStagingDeployment(); taskMockRunner.setAnswers(mockTaskArgument()); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeleteStagingDeploymentTestL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeleteStagingDeploymentTestL0.ts index 9f808886f6db..9cfbee7005ec 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeleteStagingDeploymentTestL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeleteStagingDeploymentTestL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -11,12 +11,12 @@ export class DeleteStagingDeploymentTestL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); this.mockDeploymentDeleteStagingDeployment(); taskMockRunner.setAnswers(mockTaskArgument()); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeploymentCustomImageToStagingSucceedsL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeploymentCustomImageToStagingSucceedsL0.ts index dfc7a0f2cea8..6db17527129a 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeploymentCustomImageToStagingSucceedsL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeploymentCustomImageToStagingSucceedsL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -15,12 +15,12 @@ export class DeploymentCustomImageToStagingSucceedsL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); let nockScope = this.mockDeploymentApis(); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWhenBuilderNotExistL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWhenBuilderNotExistL0.ts index 8963d39f17c6..df85ee8816ac 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWhenBuilderNotExistL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWhenBuilderNotExistL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -16,12 +16,12 @@ export class DeploymentFailsWhenBuilderNotExistL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); let nockScope = this.mockDeploymentApis(); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWithInsufficientDeploymentsL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWithInsufficientDeploymentsL0.ts index 57cfaff788a1..94b0c7f1cc6b 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWithInsufficientDeploymentsL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeploymentFailsWithInsufficientDeploymentsL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import { Inputs } from '../operations/taskparameters'; @@ -12,12 +12,12 @@ export class DeploymentFailsWithInsufficientDeploymentL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockDeploymentListApiWithSingleDeployment(); taskMockRunner.setAnswers(mockTaskArgument()); taskMockRunner.run(); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsL0.ts index 08b11eff6d0b..428901028994 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -17,12 +17,12 @@ export class DeploymentToStagingSucceedsL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); let nockScope = this.mockDeploymentApis(); diff --git a/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsWithBuildServiceL0.ts b/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsWithBuildServiceL0.ts index 942fffacac14..76f1a861bdc0 100644 --- a/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsWithBuildServiceL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/DeploymentToStagingSucceedsWithBuildServiceL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -17,12 +17,12 @@ export class DeploymentToStagingSucceedsWithBuildServiceL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); let nockScope = this.mockDeploymentApis(); diff --git a/Tasks/AzureSpringCloudV0/Tests/L0.ts b/Tasks/AzureSpringCloudV0/Tests/L0.ts index 8150beb69269..9ef2db067d39 100644 --- a/Tasks/AzureSpringCloudV0/Tests/L0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/L0.ts @@ -1,5 +1,5 @@ import fs = require('fs'); -import { AzureSpringCloudUnitTests } from './AzureSpringCloudUnitTests'; +import { AzureSpringAppsUnitTests } from './AzureSpringAppsUnitTests'; import { nock } from './mock_utils'; import { CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExist } from './CreateNamedDeploymentFailsDeploymentDoesNotAlreadyExist'; import { CreateNamedDeploymentFailsWhenTwoDeploymentsExist } from './CreateNamedDeploymentFailsWhenTwoDeploymentsExist'; @@ -14,7 +14,7 @@ import { DeploymentToStagingSucceedsWithBuildService } from './DeploymentToStagi import { DeploymentFailsWhenBuilderNotExist } from './DeploymentFailsWhenBuilderNotExist'; import { DeploymentCustomImageToStagingSucceeds } from './DeploymentCustomImageToStagingSucceeds' -describe('Azure Spring Cloud deployment Suite', function () { +describe('Azure Spring Apps deployment Suite', function () { afterEach(() => { nock.cleanAll(); }); @@ -22,8 +22,8 @@ describe('Azure Spring Cloud deployment Suite', function () { this.timeout(900000); // /*************** Unit Tests ***************/ - it('Azure Spring Cloud wrapper behaves according to expectations', AzureSpringCloudUnitTests.testDeploymentNameRetrieval); - it('Prevents a path traversal attack in the Azure Spring Cloud Resource ID', AzureSpringCloudUnitTests.testDeploymentNameRetrieval); + it('Azure Spring Apps wrapper behaves according to expectations', AzureSpringAppsUnitTests.testDeploymentNameRetrieval); + it('Prevents a path traversal attack in the Azure Spring Apps Resource ID', AzureSpringAppsUnitTests.testDeploymentNameRetrieval); /*************** Deployment tests ************/ it('Correctly errors out when attempting to use staging deployment and no staging deployment exists', DeploymentFailsWithInsufficientDeployments.mochaTest); diff --git a/Tasks/AzureSpringCloudV0/Tests/SetNamedDeploymentFailsWhenDeploymentDoesNotExistL0.ts b/Tasks/AzureSpringCloudV0/Tests/SetNamedDeploymentFailsWhenDeploymentDoesNotExistL0.ts index ce912d1f88b9..3d7e4e60df3d 100644 --- a/Tasks/AzureSpringCloudV0/Tests/SetNamedDeploymentFailsWhenDeploymentDoesNotExistL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/SetNamedDeploymentFailsWhenDeploymentDoesNotExistL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringCloudExists, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, mockCommonAzureAPIs, nock, mockAzureSpringAppsExists, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME, MOCK_SUBSCRIPTION_ID } from './mock_utils' export class SetNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0 { @@ -10,12 +10,12 @@ export class SetNamedDeploymentFailsDeploymentDoesNotAlreadyExistL0 { private static readonly MOCK_APP_NAME = 'testapp'; public static startTest() { - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); taskMockRunner.setAnswers(mockTaskArgument()); taskMockRunner.run(); diff --git a/Tasks/AzureSpringCloudV0/Tests/SetProductionNamedDeploymentSucceedsL0.ts b/Tasks/AzureSpringCloudV0/Tests/SetProductionNamedDeploymentSucceedsL0.ts index feee2bebe7bf..228572d29049 100644 --- a/Tasks/AzureSpringCloudV0/Tests/SetProductionNamedDeploymentSucceedsL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/SetProductionNamedDeploymentSucceedsL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -12,12 +12,12 @@ export class SetProductionNamedDeploymentSucceedsL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); this.mockSetActiveDeployments(); taskMockRunner.setAnswers(mockTaskArgument()); diff --git a/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingFailsWithNoStagingL0.ts b/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingFailsWithNoStagingL0.ts index 5983e10a802c..0b0e740ffb0b 100644 --- a/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingFailsWithNoStagingL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingFailsWithNoStagingL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' export class SetProductionUseStagingFailsWithNoStagingL0 { @@ -11,12 +11,12 @@ export class SetProductionUseStagingFailsWithNoStagingL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockDeploymentListApiWithSingleDeployment(); taskMockRunner.setAnswers(mockTaskArgument()); taskMockRunner.run(); diff --git a/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingSucceedsL0.ts b/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingSucceedsL0.ts index 07892133fd0f..c127345cdc17 100644 --- a/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingSucceedsL0.ts +++ b/Tasks/AzureSpringCloudV0/Tests/SetProductionUseStagingSucceedsL0.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringCloudExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; +import { setEndpointData, setAgentsData, mockTaskArgument, nock, MOCK_SUBSCRIPTION_ID, mockAzureSpringAppsExists, mockCommonAzureAPIs, API_VERSION } from './mock_utils'; import { ASC_RESOURCE_TYPE, MOCK_RESOURCE_GROUP_NAME } from './mock_utils' import assert = require('assert'); @@ -12,12 +12,12 @@ export class SetProductionUseStagingSucceedsL0 { public static startTest() { console.log(`running ${this.TEST_NAME}`); - let taskPath = path.join(__dirname, '..', 'azurespringclouddeployment.js'); + let taskPath = path.join(__dirname, '..', 'azurespringappsdeployment.js'); let taskMockRunner: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); setEndpointData(); setAgentsData(); mockCommonAzureAPIs(); - mockAzureSpringCloudExists(this.TEST_NAME); + mockAzureSpringAppsExists(this.TEST_NAME); this.mockTwoDeployments(); this.mockSetActiveDeployments(); taskMockRunner.setAnswers(mockTaskArgument()); diff --git a/Tasks/AzureSpringCloudV0/Tests/mock_utils.ts b/Tasks/AzureSpringCloudV0/Tests/mock_utils.ts index d80592751dac..9a52d7f12326 100644 --- a/Tasks/AzureSpringCloudV0/Tests/mock_utils.ts +++ b/Tasks/AzureSpringCloudV0/Tests/mock_utils.ts @@ -76,7 +76,7 @@ export function mockCommonAzureAPIs() { } -export function mockAzureSpringCloudExists(springCloudName: string) { +export function mockAzureSpringAppsExists(springAppsName: string) { nock('https://management.azure.com', { reqheaders: { @@ -84,11 +84,11 @@ export function mockAzureSpringCloudExists(springCloudName: string) { "content-type": "application/json; charset=utf-8", "user-agent": "TFS_useragent" } - }).get(`/subscriptions/${MOCK_SUBSCRIPTION_ID}/resources?$filter=resourceType%20EQ%20%27Microsoft.AppPlatform%2FSpring%27%20AND%20name%20EQ%20%27${springCloudName}%27&api-version=2016-07-01`) + }).get(`/subscriptions/${MOCK_SUBSCRIPTION_ID}/resources?$filter=resourceType%20EQ%20%27Microsoft.AppPlatform%2FSpring%27%20AND%20name%20EQ%20%27${springAppsName}%27&api-version=2016-07-01`) .reply(200, { value: [{ - id: `/subscriptions/${MOCK_SUBSCRIPTION_ID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${encodeURIComponent(springCloudName)}`, - name: springCloudName, + id: `/subscriptions/${MOCK_SUBSCRIPTION_ID}/resourceGroups/${encodeURIComponent(MOCK_RESOURCE_GROUP_NAME)}/providers/Microsoft.AppPlatform/Spring/${encodeURIComponent(springAppsName)}`, + name: springAppsName, type: ASC_RESOURCE_TYPE, tags: {}, properties: {} diff --git a/Tasks/AzureSpringCloudV0/azurespringclouddeployment.ts b/Tasks/AzureSpringCloudV0/azurespringappsdeployment.ts similarity index 86% rename from Tasks/AzureSpringCloudV0/azurespringclouddeployment.ts rename to Tasks/AzureSpringCloudV0/azurespringappsdeployment.ts index 4c0cc0e72710..da95840af665 100644 --- a/Tasks/AzureSpringCloudV0/azurespringclouddeployment.ts +++ b/Tasks/AzureSpringCloudV0/azurespringappsdeployment.ts @@ -2,7 +2,7 @@ import tl = require('azure-pipelines-task-lib/task'); import { TaskParameters, TaskParametersUtility } from './operations/taskparameters'; -import { AzureSpringCloudDeploymentProvider } from './deploymentProvider/AzureSpringCloudDeploymentProvider' +import { AzureSpringAppsDeploymentProvider } from './deploymentProvider/AzureSpringAppsDeploymentProvider' import path = require('path'); export async function main() { @@ -13,7 +13,7 @@ export async function main() { tl.setResourcePath(path.join(__dirname, 'node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json')); tl.setResourcePath(path.join(__dirname, 'node_modules/azure-pipelines-tasks-webdeployment-common/module.json')); var taskParams: TaskParameters = TaskParametersUtility.getParameters(); - var deploymentProvider = new AzureSpringCloudDeploymentProvider(taskParams); + var deploymentProvider = new AzureSpringAppsDeploymentProvider(taskParams); tl.debug("Pre-deployment Step Started"); await deploymentProvider.PreDeploymentStep(); diff --git a/Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringCloudDeploymentProvider.ts b/Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringAppsDeploymentProvider.ts similarity index 78% rename from Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringCloudDeploymentProvider.ts rename to Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringAppsDeploymentProvider.ts index 8a18b43b2939..97867c7eae4a 100644 --- a/Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringCloudDeploymentProvider.ts +++ b/Tasks/AzureSpringCloudV0/deploymentProvider/AzureSpringAppsDeploymentProvider.ts @@ -2,7 +2,7 @@ import path = require('path'); import { v4 as uuidv4 } from 'uuid'; import { Package, PackageType } from 'azure-pipelines-tasks-webdeployment-common/packageUtility'; import { Actions, DeploymentType, TaskParameters } from '../operations/taskparameters'; -import { SourceType, AzureSpringCloud } from './azure-arm-spring-cloud'; +import { SourceType, AzureSpringApps } from './azure-arm-spring-apps'; import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-endpoint'; import tl = require('azure-pipelines-task-lib/task'); import tar = require('tar'); @@ -10,12 +10,12 @@ import { AzureResourceFilterUtility } from '../operations/AzureResourceFilterUti const OUTPUT_VARIABLE_TEST_ENDPOINT = 'testEndpoint'; -export class AzureSpringCloudDeploymentProvider { +export class AzureSpringAppsDeploymentProvider { defaultInactiveDeploymentName = 'staging'; protected taskParameters: TaskParameters; - protected azureSpringCloud: AzureSpringCloud; + protected azureSpringApps: AzureSpringApps; constructor(taskParameters: TaskParameters) { this.taskParameters = taskParameters; @@ -24,20 +24,20 @@ export class AzureSpringCloudDeploymentProvider { public async PreDeploymentStep() { const azureEndpoint = await new AzureRMEndpoint(this.taskParameters.ConnectedServiceName).getEndpoint(); - //The Azure Spring Cloud parameter can be a resource ID (if selected from the picklist) or + //The Azure Spring Apps parameter can be a resource ID (if selected from the picklist) or //a name (if entered manually). This is to avoid requiring the user to enter an otherwise unnecessary user //user group name. If we have a name, we need to look up the resource ID. - var azureSpringCloudResourceId: string; - if (this.taskParameters.AzureSpringCloud.startsWith('/')) { - if (this.taskParameters.AzureSpringCloud.includes('..')){{ - throw Error(tl.loc('InvalidAzureSpringCloudResourceId', 'this.taskParameters.AzureSpringCloud')); + var azureSpringAppsResourceId: string; + if (this.taskParameters.AzureSpringApps.startsWith('/')) { + if (this.taskParameters.AzureSpringApps.includes('..')){{ + throw Error(tl.loc('InvalidAzureSpringAppsResourceId', 'this.taskParameters.AzureSpringApps')); }} - azureSpringCloudResourceId = this.taskParameters.AzureSpringCloud; + azureSpringAppsResourceId = this.taskParameters.AzureSpringApps; } else { - azureSpringCloudResourceId = await AzureResourceFilterUtility.getAzureSpringCloudResourceId(azureEndpoint, this.taskParameters.AzureSpringCloud); + azureSpringAppsResourceId = await AzureResourceFilterUtility.getAzureSpringAppsResourceId(azureEndpoint, this.taskParameters.AzureSpringApps); } - this.azureSpringCloud = new AzureSpringCloud(azureEndpoint, azureSpringCloudResourceId); + this.azureSpringApps = new AzureSpringApps(azureEndpoint, azureSpringAppsResourceId); } public async DeployAppStep() { @@ -72,9 +72,9 @@ export class AzureSpringCloudDeploymentProvider { private async performDeleteStagingDeploymentAction() { tl.debug('Delete staging deployment action'); - const deploymentName = await this.azureSpringCloud.getInactiveDeploymentName(this.taskParameters.AppName); + const deploymentName = await this.azureSpringApps.getInactiveDeploymentName(this.taskParameters.AppName); if (deploymentName) { - await this.azureSpringCloud.deleteDeployment(this.taskParameters.AppName, deploymentName); + await this.azureSpringApps.deleteDeployment(this.taskParameters.AppName, deploymentName); } else { throw Error(tl.loc('NoStagingDeploymentFound')); } @@ -86,7 +86,7 @@ export class AzureSpringCloudDeploymentProvider { var deploymentName: string; if (this.taskParameters.UseStagingDeployment) { tl.debug('Targeting inactive deployment'); - deploymentName = await this.azureSpringCloud.getInactiveDeploymentName(this.taskParameters.AppName); + deploymentName = await this.azureSpringApps.getInactiveDeploymentName(this.taskParameters.AppName); if (!deploymentName) { //If no inactive deployment exists, we cannot continue as instructed. throw Error(tl.loc('NoStagingDeploymentFound')); } @@ -94,13 +94,13 @@ export class AzureSpringCloudDeploymentProvider { else { //Verify that the named deployment actually exists. deploymentName = this.taskParameters.DeploymentName; - let existingStagingDeploymentName: string = await this.azureSpringCloud.getInactiveDeploymentName(this.taskParameters.AppName); + let existingStagingDeploymentName: string = await this.azureSpringApps.getInactiveDeploymentName(this.taskParameters.AppName); if (deploymentName != existingStagingDeploymentName) { throw Error(tl.loc('StagingDeploymentWithNameDoesntExist', deploymentName)); } } - await this.azureSpringCloud.setActiveDeployment(this.taskParameters.AppName, deploymentName); + await this.azureSpringApps.setActiveDeployment(this.taskParameters.AppName, deploymentName); } private async performDeployAction() { @@ -115,15 +115,15 @@ export class AzureSpringCloudDeploymentProvider { const {deploymentName, createDeployment} = await this.chooseDeployment(); - // Determine the sku of the Azure Spring Cloud - const serviceSkuTier = await this.azureSpringCloud.getServiceSkuTier(); + // Determine the sku of the Azure Spring Apps + const serviceSkuTier = await this.azureSpringApps.getServiceSkuTier(); try { if (serviceSkuTier == "Standard" || serviceSkuTier == "Basic") { - await this.azureSpringCloud.deploy(fileToUpload, sourceType, this.taskParameters.AppName, + await this.azureSpringApps.deploy(fileToUpload, sourceType, this.taskParameters.AppName, deploymentName, createDeployment, this.taskParameters.RuntimeVersion, this.taskParameters.JvmOptions, this.taskParameters.EnvironmentVariables, this.taskParameters.DotNetCoreMainEntryPath, this.taskParameters.Version); } else if (serviceSkuTier == "Enterprise") { - await this.azureSpringCloud.deployWithBuildService(fileToUpload, sourceType, this.taskParameters.AppName, + await this.azureSpringApps.deployWithBuildService(fileToUpload, sourceType, this.taskParameters.AppName, deploymentName, createDeployment, this.taskParameters.RuntimeVersion, this.taskParameters.JvmOptions, this.taskParameters.EnvironmentVariables, this.taskParameters.DotNetCoreMainEntryPath, this.taskParameters.Version, this.taskParameters.Builder); } else { @@ -132,7 +132,7 @@ export class AzureSpringCloudDeploymentProvider { } catch (error) { throw error; } - var testEndpoint = await this.azureSpringCloud.getTestEndpoint(this.taskParameters.AppName, deploymentName); + var testEndpoint = await this.azureSpringApps.getTestEndpoint(this.taskParameters.AppName, deploymentName); tl.setVariable(OUTPUT_VARIABLE_TEST_ENDPOINT, testEndpoint); return deploymentName; } @@ -143,14 +143,14 @@ export class AzureSpringCloudDeploymentProvider { const {deploymentName, createDeployment} = await this.chooseDeployment(); try { - await this.azureSpringCloud.deployCustomContainer(this.taskParameters.AppName, deploymentName, createDeployment, + await this.azureSpringApps.deployCustomContainer(this.taskParameters.AppName, deploymentName, createDeployment, this.taskParameters.RegistryServer, this.taskParameters.RegistryUsername, this.taskParameters.RegistryPassword, this.taskParameters.ImageName, this.taskParameters.ImageCommand, this.taskParameters.ImageArgs, this.taskParameters.ImageLanguageFramework, this.taskParameters.EnvironmentVariables, this.taskParameters.Version); } catch (error) { throw error; } - var testEndpoint = await this.azureSpringCloud.getTestEndpoint(this.taskParameters.AppName, deploymentName); + var testEndpoint = await this.azureSpringApps.getTestEndpoint(this.taskParameters.AppName, deploymentName); tl.setVariable(OUTPUT_VARIABLE_TEST_ENDPOINT, testEndpoint); return deploymentName; } @@ -159,7 +159,7 @@ export class AzureSpringCloudDeploymentProvider { var deploymentName: string; var createDeployment = false; if (this.taskParameters.UseStagingDeployment) { - deploymentName = await this.azureSpringCloud.getInactiveDeploymentName(this.taskParameters.AppName); + deploymentName = await this.azureSpringApps.getInactiveDeploymentName(this.taskParameters.AppName); if (!deploymentName) { //If no inactive deployment exists tl.debug('No inactive deployment exists'); if (this.taskParameters.CreateNewDeployment) { @@ -172,7 +172,7 @@ export class AzureSpringCloudDeploymentProvider { } else { //Deploy to deployment with specified name tl.debug('Deploying with specified name.'); deploymentName = this.taskParameters.DeploymentName; - var deploymentNames = await this.azureSpringCloud.getAllDeploymentNames(this.taskParameters.AppName); + var deploymentNames = await this.azureSpringApps.getAllDeploymentNames(this.taskParameters.AppName); if (!deploymentNames || !deploymentNames.includes(deploymentName)) { tl.debug(`Deployment ${deploymentName} does not exist`); if (this.taskParameters.CreateNewDeployment) { diff --git a/Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-cloud.ts b/Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-apps.ts similarity index 99% rename from Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-cloud.ts rename to Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-apps.ts index 02f812e07758..ad43ef80f674 100644 --- a/Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-cloud.ts +++ b/Tasks/AzureSpringCloudV0/deploymentProvider/azure-arm-spring-apps.ts @@ -51,7 +51,7 @@ const ASYNC_OPERATION_HEADER = 'azure-asyncoperation'; const API_VERSION = '2022-03-01-preview'; const LOCATION_HEADER = 'location'; -export class AzureSpringCloud { +export class AzureSpringApps { private _resourceId: string; private _client: ServiceClient; @@ -246,6 +246,10 @@ export class AzureSpringCloud { throw ToError(response); } provisioningState = response.body.properties.provisioningState; + if (provisioningState == "Failed"){ + tl.debug('KPack build failed'); + throw ToError(response); + } } catch (error) { throw error; } @@ -550,8 +554,6 @@ export class AzureSpringCloud { * @param operationStatusUrl The status URL of the Azure operation */ async awaitOperationCompletion(operationStatusUrl: string) { - - tl.debug('Checking operation status at ' + operationStatusUrl); var statusCode = 202; var message = ''; diff --git a/Tasks/AzureSpringCloudV0/operations/AzureResourceFilterUtility.ts b/Tasks/AzureSpringCloudV0/operations/AzureResourceFilterUtility.ts index d25b324c6172..c88287a4a94f 100644 --- a/Tasks/AzureSpringCloudV0/operations/AzureResourceFilterUtility.ts +++ b/Tasks/AzureSpringCloudV0/operations/AzureResourceFilterUtility.ts @@ -3,8 +3,8 @@ import { AzureEndpoint } from 'azure-pipelines-tasks-azure-arm-rest-v2/azureMode import { Resources } from 'azure-pipelines-tasks-azure-arm-rest-v2/azure-arm-resource'; export class AzureResourceFilterUtility { - public static async getAzureSpringCloudResourceId(endpoint: AzureEndpoint, resourceName: string): Promise { - tl.debug('Looking up Azure Spring Cloud Instance ' + resourceName); + public static async getAzureSpringAppsResourceId(endpoint: AzureEndpoint, resourceName: string): Promise { + tl.debug('Looking up Azure Spring Apps Instance ' + resourceName); var azureResources: Resources = new Resources(endpoint); var filteredResources: Array = await azureResources.getResources('Microsoft.AppPlatform/Spring', resourceName); let resourceId: string; @@ -15,7 +15,7 @@ export class AzureResourceFilterUtility { resourceId = filteredResources[0].id; } else { //Should never ever ever happen - throw new Error(tl.loc('DuplicateAzureSpringCloudName')); + throw new Error(tl.loc('DuplicateAzureSpringAppsName')); } tl.debug('Azure Spring Cloud Lookup completed'); return resourceId; diff --git a/Tasks/AzureSpringCloudV0/operations/taskparameters.ts b/Tasks/AzureSpringCloudV0/operations/taskparameters.ts index bfdfaa8fcfad..dd9828fdf3d8 100644 --- a/Tasks/AzureSpringCloudV0/operations/taskparameters.ts +++ b/Tasks/AzureSpringCloudV0/operations/taskparameters.ts @@ -2,7 +2,9 @@ import { Package, PackageType } from 'azure-pipelines-tasks-webdeployment-common export class Inputs { public static readonly connectedServiceName = 'ConnectedServiceName'; - public static readonly azureSpringCloud = 'AzureSpringCloud'; + // The AzureSpringCloud here is kept as it was after + // changing service name to AzureSpringApps to prevent experience breaking + public static readonly azureSpringApps = 'AzureSpringCloud'; public static readonly action = 'Action'; public static readonly appName = 'AppName'; public static readonly deploymentType = 'DeploymentType'; @@ -23,7 +25,6 @@ export class Inputs { public static readonly imageCommand = "ImageCommand"; public static readonly imageArgs = "ImageArgs"; public static readonly imageLanguageFramework = "ImageLanguageFramework"; - } export class Actions { @@ -50,7 +51,7 @@ export class TaskParametersUtility { console.log("global['_vsts_task_lib_loaded'] = " + global['_vsts_task_lib_loaded']); var taskParameters: TaskParameters = { ConnectedServiceName: tl.getInput(Inputs.connectedServiceName, true), - AzureSpringCloud: tl.getInput(Inputs.azureSpringCloud, true), + AzureSpringApps: tl.getInput(Inputs.azureSpringApps, true), Action: tl.getInput(Inputs.action, true), AppName: tl.getInput(Inputs.appName, true), DeploymentType: tl.getInput(Inputs.deploymentType, false), @@ -86,7 +87,7 @@ export class TaskParametersUtility { export interface TaskParameters { ConnectedServiceName?: string; Action: string; - AzureSpringCloud: string; //Could be resource ID or name + AzureSpringApps: string; //Could be resource ID or name AppName: string; DeploymentType?: string; UseStagingDeployment?: boolean; diff --git a/Tasks/AzureSpringCloudV0/package-lock.json b/Tasks/AzureSpringCloudV0/package-lock.json index e57873241c87..c7f248c789f6 100644 --- a/Tasks/AzureSpringCloudV0/package-lock.json +++ b/Tasks/AzureSpringCloudV0/package-lock.json @@ -258,6 +258,11 @@ "@types/node": "*" } }, + "@xmldom/xmldom": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.7.tgz", + "integrity": "sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==" + }, "JSONPath": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/JSONPath/-/JSONPath-0.11.2.tgz", @@ -332,6 +337,15 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "azure-devops-node-api": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", + "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, "azure-pipelines-task-lib": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", @@ -354,9 +368,9 @@ } }, "azure-pipelines-tasks-azure-arm-rest-v2": { - "version": "3.217.1", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest-v2/-/azure-pipelines-tasks-azure-arm-rest-v2-3.217.1.tgz", - "integrity": "sha512-kozIoKwH8T85PaTyCoRBAGgw6UONPE3mswyoPGd9pN6hqH/dwpuuazG4QdW7DIePuivKg9UYNZn9qwJzdhTUtQ==", + "version": "3.220.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest-v2/-/azure-pipelines-tasks-azure-arm-rest-v2-3.220.1.tgz", + "integrity": "sha512-KG7jUKvUMfBIe41uGgNrU6s7s3GICa/RRBG5HxvCTH/BXJEhEiAI5oU6XguHO+Hxw2pmMp9GaafkU4qxuZvmig==", "requires": { "@azure/msal-node": "1.14.5", "@types/jsonwebtoken": "^8.5.8", @@ -364,7 +378,8 @@ "@types/node": "^10.17.0", "@types/q": "1.5.4", "async-mutex": "^0.4.0", - "azure-pipelines-task-lib": "^3.1.0", + "azure-devops-node-api": "^12.0.0", + "azure-pipelines-task-lib": "^3.4.0", "https-proxy-agent": "^4.0.0", "jsonwebtoken": "^8.5.1", "node-fetch": "^2.6.7", diff --git a/Tasks/AzureSpringCloudV0/package.json b/Tasks/AzureSpringCloudV0/package.json index 40bedbe0ba0b..63a47163c0ea 100644 --- a/Tasks/AzureSpringCloudV0/package.json +++ b/Tasks/AzureSpringCloudV0/package.json @@ -25,14 +25,15 @@ "@types/mocha": "8.2.1", "@types/node": "^10.17.0", "@types/q": "1.0.7", - "JSONPath": "^0.11.2", + "@xmldom/xmldom": "^0.8.7", "azure-pipelines-tasks-azure-arm-rest-v2": "^3.217.1", + "azure-pipelines-tasks-webdeployment-common": "4.208.0", + "JSONPath": "^0.11.2", "moment": "^2.29.4", "nock": "9.0.11", "q": "1.4.1", "tar": "^6.1.11", "uuid": "3.1.0", - "azure-pipelines-tasks-webdeployment-common": "4.208.0", "xml2js": "0.4.13" }, "devDependencies": { diff --git a/Tasks/AzureSpringCloudV0/task.json b/Tasks/AzureSpringCloudV0/task.json index 8d3bbb702361..e32aaf653eec 100644 --- a/Tasks/AzureSpringCloudV0/task.json +++ b/Tasks/AzureSpringCloudV0/task.json @@ -1,10 +1,10 @@ { "id": "5679292e-de0e-473a-948e-4874d2d8ef97", "name": "AzureSpringCloud", - "friendlyName": "Azure Spring Cloud", - "description": "Deploy applications to Azure Spring Cloud and manage deployments.", - "helpUrl": "https://aka.ms/azurespringcloud", - "helpMarkDown": "[Learn more about this task](https://aka.ms/azurespringcloud)", + "friendlyName": "Azure Spring Apps", + "description": "Deploy applications to Azure Spring Apps and manage deployments.", + "helpUrl": "https://aka.ms/azurespringapps", + "helpMarkDown": "[Learn more about this task](https://aka.ms/azurespringapps)", "category": "Deploy", "visibility": [ "Build", @@ -18,7 +18,7 @@ "preview": true, "version": { "Major": 0, - "Minor": 220, + "Minor": 221, "Patch": 1 }, "minimumAgentVersion": "2.104.1", @@ -46,7 +46,7 @@ "type": "pickList", "label": "Action", "required": true, - "helpMarkDown": "Action to be performed on Azure Spring Cloud.", + "helpMarkDown": "Action to be performed on Azure Spring Apps.", "defaultValue": "Deploy", "options": { "Deploy": "Deploy", @@ -57,12 +57,12 @@ { "name": "AzureSpringCloud", "type": "pickList", - "label": "Azure Spring Cloud Name", + "label": "Azure Spring Apps Name", "required": true, "properties": { "EditableOptions": "True" }, - "helpMarkDown": "Select the Azure Spring Cloud service to which to deploy." + "helpMarkDown": "Select the Azure Spring Apps service to which to deploy." }, { "name": "AppName", @@ -72,7 +72,7 @@ "properties": { "EditableOptions": "True" }, - "helpMarkDown": "Select the Azure Spring Cloud app to deploy." + "helpMarkDown": "Select the Azure Spring Apps app to deploy." }, { "name": "DeploymentType", @@ -123,7 +123,7 @@ "defaultValue": "$(System.DefaultWorkingDirectory)/**/*.jar", "required": false, "visibleRule": "Action = Deploy && DeploymentType = Artifacts", - "helpMarkDown": "File path to the package or a folder containing the Spring Cloud app contents.
Variables ( [Build](https://docs.microsoft.com/vsts/pipelines/build/variables) | [Release](https://docs.microsoft.com/vsts/pipelines/release/variables#default-variables)), wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\\*\\*/\\*.jar." + "helpMarkDown": "File path to the package or a folder containing the Spring Apps app contents.
Variables ( [Build](https://docs.microsoft.com/vsts/pipelines/build/variables) | [Release](https://docs.microsoft.com/vsts/pipelines/release/variables#default-variables)), wildcards are supported.
For example, $(System.DefaultWorkingDirectory)/\\*\\*/\\*.jar." }, { "name": "Builder", @@ -133,7 +133,7 @@ "visibleRule": "Action = Deploy && DeploymentType = Artifacts", "required": false, "groupName": "ApplicationAndConfigurationSettings", - "helpMarkDown": "Select a builder of VMware Tanzu® Build Service™, this can be used in enterprise tier.
For detailed description, please check [Use Tanzu Build Service](https://docs.microsoft.com/en-us/azure/spring-cloud/how-to-enterprise-build-service?tabs=azure-portal)." + "helpMarkDown": "Select a builder of VMware Tanzu® Build Service™, this can be used in enterprise tier.
For detailed description, please check [Use Tanzu Build Service](https://docs.microsoft.com/en-us/azure/spring-apps/how-to-enterprise-build-service?tabs=azure-portal)." }, { "name": "RegistryServer", @@ -300,10 +300,10 @@ "resultSelector": "jsonpath:$.value[*]" } ], - "instanceNameFormat": "Azure Spring Cloud $(Action): $(AppName)", + "instanceNameFormat": "Azure Spring Apps $(Action): $(AppName)", "execution": { "Node10": { - "target": "azurespringclouddeployment.js" + "target": "azurespringappsdeployment.js" } }, "messages": { @@ -313,7 +313,7 @@ "StartingUploadOf": "Starting upload of %s", "CompletedUploadOf": "Upload of %s completed.", "ResourceDoesntExist": "Resource '%s' doesn't exist. Resource should exist before deployment.", - "UnableToGetDeploymentUrl": "Unable to get deployment URL for Azure Spring Cloud '%s', Error: '%s'", + "UnableToGetDeploymentUrl": "Unable to get deployment URL for Azure Spring Apps '%s', Error: '%s'", "DeploymentDoesntExist": "Deployment with name '%s' does not exist. Unable to proceed.", "StagingDeploymentWithNameDoesntExist": "Staging deployment with name %s does not exist. Unable to proceed.", "NoStagingDeploymentFound": "No staging deployment found.", @@ -327,8 +327,8 @@ "UnableToRetrieveTestEndpointKeys": "Unable to retrieve test endpoint keys", "NoDeploymentsExist": "No deployments exist.", "UnableToGetDeploymentInformation": "Unable to get deployment information.", - "DuplicateAzureSpringCloudName": "Illegal state: multiple Azure Spring Cloud instances with same name.", - "InvalidAzureSpringCloudResourceId": "Invalid azure spring cloud resource identifier: %s", + "DuplicateAzureSpringAppsName": "Illegal state: multiple Azure Spring Apps instances with same name.", + "InvalidAzureSpringAppsResourceId": "Invalid Azure Spring Apps resource identifier: %s", "Nopackagefoundwithspecifiedpattern": "No package found with specified pattern: %s. Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.", "MorethanonepackagematchedwithspecifiedpatternPleaserestrainthesearchpattern": "More than one package matched with specified pattern: %s. Please restrain the search pattern." } diff --git a/Tasks/AzureSpringCloudV0/task.loc.json b/Tasks/AzureSpringCloudV0/task.loc.json index fb9591952894..cad1aeb9137d 100644 --- a/Tasks/AzureSpringCloudV0/task.loc.json +++ b/Tasks/AzureSpringCloudV0/task.loc.json @@ -3,7 +3,7 @@ "name": "AzureSpringCloud", "friendlyName": "ms-resource:loc.friendlyName", "description": "ms-resource:loc.description", - "helpUrl": "https://aka.ms/azurespringcloud", + "helpUrl": "https://aka.ms/azurespringapps", "helpMarkDown": "ms-resource:loc.helpMarkDown", "category": "Deploy", "visibility": [ @@ -18,7 +18,7 @@ "preview": true, "version": { "Major": 0, - "Minor": 220, + "Minor": 221, "Patch": 1 }, "minimumAgentVersion": "2.104.1", @@ -303,7 +303,7 @@ "instanceNameFormat": "ms-resource:loc.instanceNameFormat", "execution": { "Node10": { - "target": "azurespringclouddeployment.js" + "target": "azurespringappsdeployment.js" } }, "messages": { @@ -327,8 +327,8 @@ "UnableToRetrieveTestEndpointKeys": "ms-resource:loc.messages.UnableToRetrieveTestEndpointKeys", "NoDeploymentsExist": "ms-resource:loc.messages.NoDeploymentsExist", "UnableToGetDeploymentInformation": "ms-resource:loc.messages.UnableToGetDeploymentInformation", - "DuplicateAzureSpringCloudName": "ms-resource:loc.messages.DuplicateAzureSpringCloudName", - "InvalidAzureSpringCloudResourceId": "ms-resource:loc.messages.InvalidAzureSpringCloudResourceId", + "DuplicateAzureSpringAppsName": "ms-resource:loc.messages.DuplicateAzureSpringAppsName", + "InvalidAzureSpringAppsResourceId": "ms-resource:loc.messages.InvalidAzureSpringAppsResourceId", "Nopackagefoundwithspecifiedpattern": "ms-resource:loc.messages.Nopackagefoundwithspecifiedpattern", "MorethanonepackagematchedwithspecifiedpatternPleaserestrainthesearchpattern": "ms-resource:loc.messages.MorethanonepackagematchedwithspecifiedpatternPleaserestrainthesearchpattern" }