diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..0d0911d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "msft-extensions", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/pipelines/powerbiactions-xplat.yml b/pipelines/powerbiactions-xplat.yml index 2517fb0..bd0317c 100644 --- a/pipelines/powerbiactions-xplat.yml +++ b/pipelines/powerbiactions-xplat.yml @@ -35,7 +35,9 @@ stages: demands: azureps continueOnError: false steps: - - template: steps/build.yml + - template: steps/build-node.yml + parameters: + extensiondirectory: "azuredevops/powerbiactions-xplat/powerbiactionsxplat" - stage: Beta displayName: Test condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/pipelines/steps/build-node.yml b/pipelines/steps/build-node.yml new file mode 100644 index 0000000..29fea5c --- /dev/null +++ b/pipelines/steps/build-node.yml @@ -0,0 +1,51 @@ +parameters: +- name: extensiondirectory + type: string + +steps: +- task: TfxInstaller@4 + displayName: "Install TFX" + inputs: + checkLatest: true +- task: Npm@1 + inputs: + command: 'install' + workingDir: '${{ parameters.extensiondirectory }}' +- task: Bash@3 + displayName: Compile Javascript + inputs: + targetType: "inline" + script: | + cd '${{ parameters.extensiondirectory }}' + tsc +- task: PackageAzureDevOpsExtension@4 + displayName: 'Package extension' + inputs: + rootFolder: '$(rootfolder)' + outputVariable: 'ExOutputPath' + publisherId: 'maikvandergaag' + extensionTag: 'alpha' + extensionVersion: '$(Build.Buildnumber)' + updateTasksVersion: true + extensionVisibility: 'private' + extensionPricing: 'free' +- task: PublishPipelineArtifact@1 + displayName: 'Publish artifact' + inputs: + targetPath: '$(ExOutputPath)' + artifact: '$(artifactName)' +- task: versioncounter@1 + displayName: 'Update - Version number (develop)' + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + inputs: + VersionVariable: 'buildversion' + UpdateMinorVersion: false + DevOpsPat: '$(devops-pat-versionnumber)' +- task: versioncounter@1 + displayName: 'Update - Version number (Pull Request)' + condition: and(succeeded(), and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/master'))) + inputs: + VersionVariable: 'buildversion' + UpdateMinorVersion: false + OnlyUpdateMinor: true + DevOpsPat: '$(devops-pat-versionnumber)' diff --git a/pipelines/steps/publish.yml b/pipelines/steps/publish.yml index afac3d5..84a27ae 100644 --- a/pipelines/steps/publish.yml +++ b/pipelines/steps/publish.yml @@ -1,11 +1,12 @@ steps: - - task: TfxInstaller@3 + - task: TfxInstaller@4 displayName: "Install TFX" inputs: checkLatest: true - - task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishExtension@3 + - task: PublishAzureDevOpsExtension@4 displayName: "Publish Extension" inputs: + connectTo: 'VsTeam' connectedServiceName: "Visual Studio Marketplace" fileType: vsix vsixFile: '$(Pipeline.Workspace)\$(artifactName)\*.vsix' diff --git a/pipelines/steps/test.yml b/pipelines/steps/test.yml index 6d86d18..cbaad66 100644 --- a/pipelines/steps/test.yml +++ b/pipelines/steps/test.yml @@ -1,11 +1,12 @@ steps: - - task: TfxInstaller@3 + - task: TfxInstaller@4 displayName: "Install TFX" inputs: checkLatest: true - - task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishExtension@3 + - task: PublishAzureDevOpsExtension@4 displayName: "Publish Extension" inputs: + connectTo: 'VsTeam' connectedServiceName: "Visual Studio Marketplace" fileType: vsix vsixFile: '$(Pipeline.Workspace)\$(artifactName)\*.vsix'