diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml index 5b40a3c..7382d47 100644 --- a/.azure-pipelines/azure-pipeline.yml +++ b/.azure-pipelines/azure-pipeline.yml @@ -1,25 +1,25 @@ variables: - - name: major - value: "1" - - name: minor - value: "1" - - name: extensionName - value: "EmailReportExtension" - - name: marketplaceServiceConnection - value: "marketplaceServiceConnection" - - name: publisherId - value: "ms-devlabs" - - name: publicExtensionName - value: "Email Report Extension" - - name: extensionId - value: "EmailReportExtension" +- name: major + value: "1" +- name: minor + value: "1" +- name: extensionName + value: "EmailReportExtension" +- name: marketplaceServiceConnection + value: "marketplaceServiceConnection" +- name: publisherId + value: "ms-devlabs" +- name: publicExtensionName + value: "Email Report Extension" +- name: extensionId + value: "EmailReportExtension" name: $(major).$(minor)$(rev:.r) trigger: branches: include: - - master + - master pr: none @@ -27,66 +27,70 @@ resources: repositories: - repository: pipeline-templates type: git - name: Sage/pipeline-template + name: Sage/pipeline-templates ref: main stages: - - stage: "Build" - jobs: - - job: "BuildPack" - displayname: "Build and package" - pool: - vmImage: "ubuntu-latest" - steps: - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - template: build.yml@pipeline-templates - - template: package.yml@pipeline-templates - parameters: - extensionName: $(extensionName) - outputPath: "out" +- stage: "Build" + jobs: + - job: "BuildPack" + displayName: "Build and package" + pool: + vmImage: "ubuntu-latest" + steps: + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" - - stage: "DeployDev" - displayName: "Deploy to Dev" - dependsOn: "Build" - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - jobs: - - template: deploy.yml@pipeline-templates - parameters: - environment: "dev" - extensionName: $(extensionName) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - - stage: "DeployTest" - displayName: "Deploy to Test" - dependsOn: "DeployDev" - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - jobs: - - template: deploy.yml@pipeline-templates - parameters: - environment: "test" - extensionName: $(extensionName) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - updateTaskVersion: true - extensionId: $(extensionId) + - template: build.yml@pipeline-templates + - template: package.yml@pipeline-templates + parameters: + extensionName: $(extensionName) + outputPath: "out" + rootPath: './dist' - - stage: "DeployRelease" - displayName: "Deploy to Public" - dependsOn: "DeployTest" - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - jobs: - - template: deploy.yml@pipeline-templates - parameters: - environment: "public" - extensionName: $(extensionName) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - extensionVisibility: "public" - updateTaskVersion: true - extensionId: $(extensionId) + +- stage: "DeployDev" + displayName: "Deploy to Dev" + dependsOn: "Build" + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + jobs: + - template: deploy.yml@pipeline-templates + parameters: + environment: 'dev' + extensionName: $(extensionName) + marketplaceConnectedServiceName: $(marketplaceServiceConnection) + publisherId: $(publisherId) + publicExtensionName: $(publicExtensionName) + updateTaskVersion: true +- stage: "DeployTest" + displayName: "Deploy to Test" + dependsOn: "DeployDev" + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + jobs: + - template: deploy.yml@pipeline-templates + parameters: + environment: "test" + extensionName: $(extensionName) + marketplaceConnectedServiceName: $(marketplaceServiceConnection) + publisherId: $(publisherId) + publicExtensionName: $(publicExtensionName) + updateTaskVersion: true + extensionId: $(extensionId) + +- stage: "DeployRelease" + displayName: "Deploy to Public" + dependsOn: "DeployTest" + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + jobs: + - template: deploy.yml@pipeline-templates + parameters: + environment: "public" + extensionName: $(extensionName) + marketplaceConnectedServiceName: $(marketplaceServiceConnection) + publisherId: $(publisherId) + publicExtensionName: $(publicExtensionName) + extensionVisibility: "public" + updateTaskVersion: true + extensionId: $(extensionId) diff --git a/Extensions/emailReportTask/azure-devops-extensions.json b/Extensions/emailReportTask/azure-devops-extension.json similarity index 100% rename from Extensions/emailReportTask/azure-devops-extensions.json rename to Extensions/emailReportTask/azure-devops-extension.json diff --git a/webpack.config.js b/webpack.config.js index 85ea994..571f858 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,7 +16,7 @@ module.exports = { { from: "./Extensions/emailReportTask/images", to: "images", context: "." }, { from: "./README.md", to: "README.md" }, { from: "./LICENSE", to: "." }, - { from: "./Extensions/emailReportTask/azure-devops-extensions.json", to: "azure-devops-extension.json" }, + { from: "./Extensions/emailReportTask/azure-devops-extension.json", to: "azure-devops-extension.json" }, { from: "./Extensions/emailReportTask/Tasks", globOptions: {