Skip to content

Commit

Permalink
added prod env
Browse files Browse the repository at this point in the history
  • Loading branch information
joalmeid committed Apr 1, 2020
1 parent c7c52bb commit 8e42123
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 33 deletions.
57 changes: 24 additions & 33 deletions .pipelines/pipeline-triggerer-extension-CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ stages:
displayName: 'Publish artifacts: extension'
artifact: $(artifactName)

- stage: Publish_Ext
- stage: Publish_Ext_Dev
displayName: DEV
dependsOn: Build_Ext
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
Expand All @@ -99,38 +99,29 @@ stages:
vmImage: 'ubuntu-latest'

steps:
- download: current
artifact: $(artifactName)
patterns: '**/*'
- template: template-release.yaml
parameters:
publisherId: $(publisherId)
projName: $(projName)
marketplaceServiceConnection: $(vsMarketplaceServiceConnetion)
artifactName: $(artifactName)
# extensionVisibility: private

- task: ms-devlabs.vsts-developer-tools-build-tasks.tfx-installer-build-task.TfxInstaller@1
displayName: 'Use Node CLI for Azure DevOps: v0.7.3'
inputs:
version: v0.7.3
enabled: false
- stage: Publish_Ext_Prod
displayName: PROD
dependsOn: Build_Ext
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- job: PublishExt
displayName: Publish Extension
pool:
vmImage: 'ubuntu-latest'

- task: ms-devlabs.vsts-developer-tools-build-tasks.extension-version-build-task.ExtensionVersion@1
displayName: 'Query Extension Version'
inputs:
connectedServiceName: '$(vsMarketplaceServiceConnetion)'
publisherId: $(publisherId)
extensionId: $(projName)
- task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishExtension@1
displayName: 'Publish Extension'
inputs:
connectedServiceName: '$(vsMarketplaceServiceConnetion)'
fileType: vsix
vsixFile: '$(Pipeline.Workspace)/$(artifactName)/$(publisherId).$(projName)-*.vsix'
steps:
- template: template-release.yaml
parameters:
publisherId: $(publisherId)
extensionName: 'Azure DevOps Pipeline Triggerer Extension'
updateTasksVersion: false
extensionVisibility: private
extensionPricing: free
outputVariable: ExtensionOutputPath
- task: ms-devlabs.vsts-developer-tools-build-tasks.share-extension-build-task.ShareExtension@1
displayName: 'Share Extension'
inputs:
connectedServiceName: '$(vsMarketplaceServiceConnetion)'
method: vsix
vsixFile: '$(Pipeline.Workspace)/$(artifactName)/$(publisherId).$(projName)-*.vsix'
accounts: $(publisherId)
projName: $(projName)
marketplaceServiceConnection: $(vsMarketplaceServiceConnetion)
artifactName: $(artifactName)
extensionVisibility: public
45 changes: 45 additions & 0 deletions .pipelines/template-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
parameters:
publisherId: # Published Id @ https://marketplace.visualstudio.com/manage
projName: # Required: Extension Name
marketplaceServiceConnection: # Required: Service connection for Visual Studio Marketplace
artifactName: 'extension-artifact' # Artifact name
extensionVisibility: private

steps:
- download: current
artifact: ${{parameters.artifactName}}
patterns: '**/*'

- task: ms-devlabs.vsts-developer-tools-build-tasks.tfx-installer-build-task.TfxInstaller@1
displayName: 'Use Node CLI for Azure DevOps: v0.7.3'
inputs:
version: v0.7.3
enabled: false

- task: ms-devlabs.vsts-developer-tools-build-tasks.extension-version-build-task.ExtensionVersion@1
displayName: 'Query Extension Version'
inputs:
connectedServiceName: ${{parameters.marketplaceServiceConnection}}
publisherId: ${{parameters.publisherId}}
extensionId: ${{parameters.projName}}

- task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishExtension@1
displayName: 'Publish Extension'
inputs:
connectedServiceName: ${{parameters.marketplaceServiceConnection}}
fileType: vsix
vsixFile: '$(Pipeline.Workspace)/${{parameters.artifactName}}/${{parameters.publisherId}}.${{parameters.projName}}-*.vsix'
publisherId: ${{parameters.publisherId}}
extensionName: 'Azure DevOps Pipeline Triggerer Extension'
updateTasksVersion: false
extensionVisibility: ${{parameters.extensionVisibility}}
extensionPricing: free
outputVariable: ExtensionOutputPath

- task: ms-devlabs.vsts-developer-tools-build-tasks.share-extension-build-task.ShareExtension@1
displayName: 'Share Extension'
inputs:
connectedServiceName: ${{parameters.marketplaceServiceConnection}}
method: vsix
vsixFile: '$(Pipeline.Workspace)/${{parameters.artifactName}}/${{parameters.publisherId}}.${{parameters.projName}}-*.vsix'
accounts: ${{parameters.publisherId}}

0 comments on commit 8e42123

Please sign in to comment.