Skip to content

Commit

Permalink
Initial template
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyPristensky committed Mar 15, 2024
1 parent ad7c74b commit b5be61c
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .azurepipelines/build-code-push-1es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
trigger:
- master

pr:
- master

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
name: $(Build.SourceBranchName)_$(date:yyyyMMdd)$(rev:.r)

extends:
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: 1ES-PT-CBL-Mariner-2.0-Gen2
os: linux
customBuildTags:
- ES365AIMigrationTooling-BulkMigrated
sdl:
sourceAnalysisPool: 1ES-PT-Windows-2022
credscan:
suppressionsFile: $(Build.SourcesDirectory)/.config/CredScanSuppressions.json
stages:
- stage: Stage
jobs:
- job: HostJob
templateContext:
outputs:
- output: pipelineArtifact
displayName: "Publish Artifact: artifacts"
path: '$(Build.ArtifactStagingDirectory)/npm'
artifactName: npm

steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'

- script: |
npm pack
npm install -g code-push*.tgz
displayName: 'Package code-push'
workingDirectory: $(Build.SourcesDirectory)
- task: DeleteFiles@1
inputs:
contents: node_modules
displayName: 'Delete node_modules'

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
archiveType: 'tar'
archiveFile: '$(Build.ArtifactStagingDirectory)/npm/$(Build.BuildId).tgz'
replaceExistingArchive: true
verbose: true
displayName: 'Prepare npm artifact'
6 changes: 6 additions & 0 deletions .config/CredScanSuppressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tool": "Credential Scanner",
"suppressions": [
]
}

0 comments on commit b5be61c

Please sign in to comment.