|
| 1 | +pr: none |
| 2 | +trigger: |
| 3 | + - master |
| 4 | +variables: |
| 5 | + - group: InfoSec-SecurityResults |
| 6 | + - name: tags |
| 7 | + value: production,externalfacing |
| 8 | + - name: serviceTreeID |
| 9 | + value: 21f0b890-e3a8-4c0b-b9e7-2f764f8b799c |
| 10 | + |
| 11 | +resources: |
| 12 | + repositories: |
| 13 | + - repository: 1ESPipelineTemplates |
| 14 | + type: git |
| 15 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 16 | + ref: refs/tags/release |
| 17 | + |
| 18 | +extends: |
| 19 | + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates |
| 20 | + |
| 21 | + parameters: |
| 22 | + sdl: |
| 23 | + sourceAnalysisPool: |
| 24 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 25 | + image: windows-2022 |
| 26 | + os: windows |
| 27 | + stages: |
| 28 | + - stage: release |
| 29 | + variables: |
| 30 | + # OPTIONAL: Set this varibale to 'true' to enable signing in a target stage. |
| 31 | + # Remove if signing is not required. |
| 32 | + Build.ESRP.CodeSign.Enabled: false |
| 33 | + # OPTIONAL: To disable required tools not applicable in the pipeline set to false. |
| 34 | + # Supported values: BinSkim, Roslyn, ESLint, PREFast. |
| 35 | + Build.SDL.<Roslyn>.Enabled: false |
| 36 | + Build.SDL.<ESLint>.Enabled: true |
| 37 | + jobs: |
| 38 | + - job: Build |
| 39 | + displayName: Build ObjectStoreProvider Package |
| 40 | + pool: |
| 41 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 42 | + image: ubuntu-latest |
| 43 | + os: linux |
| 44 | + templateContext: |
| 45 | + outputs: |
| 46 | + - output: pipelineArtifact |
| 47 | + targetPath: $(System.DefaultWorkingDirectory)/dist |
| 48 | + artifactName: package-$(Build.BuildId)-$(Build.BuildNumber) |
| 49 | + - output: pipelineArtifact |
| 50 | + targetPath: $(System.DefaultWorkingDirectory)/packages |
| 51 | + artifactName: npm-package-$(Build.BuildId)-$(Build.BuildNumber) |
| 52 | + steps: |
| 53 | + - checkout: self |
| 54 | + - task: NodeTool@0 |
| 55 | + displayName: "Installing node" |
| 56 | + inputs: |
| 57 | + versionSpec: "16" |
| 58 | + - script: yarn --frozen-lockfile |
| 59 | + displayName: yarn |
| 60 | + - script: yarn build && yarn test:ci |
| 61 | + displayName: build and test [test] |
| 62 | + |
| 63 | + - script: | |
| 64 | + mkdir -p $(System.DefaultWorkingDirectory)/packages |
| 65 | + npm pack --pack-destination $(System.DefaultWorkingDirectory)/packages |
| 66 | + displayName: "Generate npm package (.tgz)" |
| 67 | +
|
| 68 | + - job: Release |
| 69 | + displayName: ObjectStoreProvider Release |
| 70 | + dependsOn: Build |
| 71 | + pool: |
| 72 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 73 | + image: ubuntu-latest |
| 74 | + os: linux |
| 75 | + templateContext: |
| 76 | + type: releaseJob |
| 77 | + isProduction: true |
| 78 | + inputs: |
| 79 | + - input: pipelineArtifact |
| 80 | + artifactName: npm-package-$(Build.BuildId)-$(Build.BuildNumber) |
| 81 | + targetPath: $(Pipeline.Workspace)/packages |
| 82 | + steps: |
| 83 | + - task: EsrpRelease@9 |
| 84 | + displayName: "ESRP Release to npm" |
| 85 | + inputs: |
| 86 | + connectedservicename: $(Release.ConnectedServiceName) |
| 87 | + usemanagedidentity: true |
| 88 | + keyvaultname: $(Release.KeyVaultName) |
| 89 | + signcertname: $(Release.SignCertName) |
| 90 | + clientid: $(Release.ClientId) |
| 91 | + contenttype: "npm" |
| 92 | + folderlocation: $(Pipeline.Workspace)/packages |
| 93 | + owners: $(Release.Owners) |
| 94 | + approvers: $(Release.Approvers) |
| 95 | + mainpublisher: ESRPRELPACMAN |
| 96 | + domaintenantid: $(Release.DomainTenantId) |
0 commit comments