Skip to content

Commit

Permalink
Fix pipeline (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
madkoo authored Oct 17, 2023
1 parent 123182c commit 5db9bc0
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 74 deletions.
150 changes: 77 additions & 73 deletions .azure-pipelines/azure-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,96 @@
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

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)
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 5db9bc0

Please sign in to comment.