From fa6c4036d1a193bcc1762399b1bb66bfc7dc7b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 14:24:46 +0300 Subject: [PATCH 1/6] update indentation in pipeline --- .azure-pipelines/azure-pipeline.yml | 114 ++++++++++++++-------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml index 5b40a3c..b9538cc 100644 --- a/.azure-pipelines/azure-pipeline.yml +++ b/.azure-pipelines/azure-pipeline.yml @@ -31,62 +31,62 @@ resources: 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: "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" +- 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) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - updateTaskVersion: true - extensionId: $(extensionId) + outputPath: "out" - - 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) + 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) + +- 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) From 2b1607a062b266081d4fbbd1d4028d3930f66c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 14:34:18 +0300 Subject: [PATCH 2/6] fix indentation in pipeline --- .azure-pipelines/azure-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml index b9538cc..357e14c 100644 --- a/.azure-pipelines/azure-pipeline.yml +++ b/.azure-pipelines/azure-pipeline.yml @@ -34,7 +34,7 @@ stages: - stage: "Build" jobs: - job: "BuildPack" - displayname: "Build and package" + displayName: "Build and package" pool: vmImage: "ubuntu-latest" steps: @@ -45,8 +45,8 @@ stages: - template: build.yml@pipeline-templates - template: package.yml@pipeline-templates parameters: - extensionName: $(extensionName) - outputPath: "out" + extensionName: $(extensionName) + outputPath: "out" - stage: "DeployDev" displayName: "Deploy to Dev" From ce9758f95ca8dbf60a50f6a1520e1287d4e3dee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 14:41:50 +0300 Subject: [PATCH 3/6] Solve issues in pipeline --- .azure-pipelines/azure-pipeline.yml | 114 ++++++++++++++-------------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml index 357e14c..827ab43 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,68 @@ 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" + - 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: "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) + - 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) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - updateTaskVersion: true - extensionId: $(extensionId) + - 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) - marketplaceServiceConnection: $(marketplaceServiceConnection) - publisherId: $(publisherId) - publicExtensionName: $(publicExtensionName) - extensionVisibility: "public" - updateTaskVersion: true - extensionId: $(extensionId) + - template: deploy.yml@pipeline-templates + parameters: + environment: "public" + extensionName: $(extensionName) + marketplaceConnectedServiceName: $(marketplaceServiceConnection) + publisherId: $(publisherId) + publicExtensionName: $(publicExtensionName) + extensionVisibility: "public" + updateTaskVersion: true + extensionId: $(extensionId) From cf356482c0b047f4c4a35efe761e3e3a1b97632d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 14:52:03 +0300 Subject: [PATCH 4/6] correct manifest file name --- .../{azure-devops-extensions.json => azure-devops-extension.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Extensions/emailReportTask/{azure-devops-extensions.json => azure-devops-extension.json} (100%) 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 From 7fe8746564fecf14a358bbdcebacc3875b619594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 15:00:32 +0300 Subject: [PATCH 5/6] correct manifest file name in webpack --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: { From 403ef4a9e59c43885f059659b9ff3ff3081a3319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20K=C3=B5osaar?= Date: Tue, 17 Oct 2023 15:11:54 +0300 Subject: [PATCH 6/6] add rootPath for package --- .azure-pipelines/azure-pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml index 827ab43..7382d47 100644 --- a/.azure-pipelines/azure-pipeline.yml +++ b/.azure-pipelines/azure-pipeline.yml @@ -48,6 +48,8 @@ stages: parameters: extensionName: $(extensionName) outputPath: "out" + rootPath: './dist' + - stage: "DeployDev" displayName: "Deploy to Dev"