|
3 | 3 | # Uses the common build logic, but also gains capabilities related to releasing the product.
|
4 | 4 |
|
5 | 5 | # Only trigger manually
|
6 |
| -trigger: none |
7 |
| -pr: none |
8 | 6 |
|
9 |
| -pool: |
10 |
| - vmImage: ubuntu-20.04 |
| 7 | +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. |
| 8 | +# This pipeline will be extended to the OneESPT template |
11 | 9 |
|
12 |
| -steps: |
13 |
| -# release version should be correctly set in package.json |
14 |
| -- bash: | |
15 |
| - PACKAGE_VERSION=$(node -p "require('./package.json').version") |
16 |
| - echo "##vso[build.updatebuildnumber]${PACKAGE_VERSION}_release_${BUILD_BUILDID}" |
17 |
| - echo "$PACKAGE_VERSION" > version.txt |
18 |
| - displayName: Set version number of build |
| 10 | +trigger: none |
| 11 | +pr: none |
| 12 | +resources: |
| 13 | + repositories: |
| 14 | + - repository: 1ESPipelineTemplates |
| 15 | + type: git |
| 16 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 17 | + ref: refs/tags/release |
| 18 | +extends: |
| 19 | + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates |
| 20 | + parameters: |
| 21 | + settings: |
| 22 | + skipBuildTagsForGitHubPullRequests: true |
| 23 | + # featureFlags: |
| 24 | + # autoBaseline: false |
| 25 | + sdl: |
| 26 | + baseline: |
| 27 | + baselineSet: default |
| 28 | + baselineFile: $(Build.SourcesDirectory)/.gdn/.gdnbaselines |
| 29 | + sourceAnalysisPool: |
| 30 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 31 | + image: windows-2022 |
| 32 | + os: windows |
| 33 | + pool: |
| 34 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 35 | + image: ubuntu-latest |
| 36 | + os: linux |
| 37 | + customBuildTags: |
| 38 | + - ES365AIMigrationTooling |
| 39 | + stages: |
| 40 | + - stage: stage |
| 41 | + jobs: |
| 42 | + - job: job |
| 43 | + templateContext: |
| 44 | + outputs: |
| 45 | + - output: pipelineArtifact |
| 46 | + displayName: 'Publish VSIX' |
| 47 | + artifactName: azure-pipelines-vscode |
| 48 | + targetPath: $(Build.ArtifactStagingDirectory) |
| 49 | + steps: |
| 50 | + # release version should be correctly set in package.json |
| 51 | + - bash: | |
| 52 | + PACKAGE_VERSION=$(node -p "require('./package.json').version") |
| 53 | + echo "##vso[build.updatebuildnumber]${PACKAGE_VERSION}_release_${BUILD_BUILDID}" |
| 54 | + echo "$PACKAGE_VERSION" > version.txt |
| 55 | + displayName: Set version number of build |
19 | 56 |
|
20 |
| -# do all the normal build stuff |
21 |
| -- template: common-steps.yml |
| 57 | + # do all the normal build stuff |
| 58 | + - template: /.azure-pipelines/common-steps.yml@self |
22 | 59 |
|
23 |
| -# if the mini changelog is empty, complain |
24 |
| -- bash: | |
25 |
| - LINE_COUNT=$(cat minichangelog.txt | wc -l) |
26 |
| - if [ "$LINE_COUNT" -lt 3 ]; then |
27 |
| - echo Mini changelog is too short. Did you use the wrong version number in CHANGELOG.txt? |
28 |
| - exit 1 |
29 |
| - fi |
30 |
| - displayName: Check for length of mini-changelog |
| 60 | + # if the mini changelog is empty, complain |
| 61 | + - bash: | |
| 62 | + LINE_COUNT=$(cat minichangelog.txt | wc -l) |
| 63 | + if [ "$LINE_COUNT" -lt 3 ]; then |
| 64 | + echo Mini changelog is too short. Did you use the wrong version number in CHANGELOG.txt? |
| 65 | + exit 1 |
| 66 | + fi |
| 67 | + displayName: Check for length of mini-changelog |
31 | 68 |
|
32 |
| -# create a GitHub Release |
33 |
| -- bash: | |
34 |
| - export npm_config_cache=$(Build.SourcesDirectory)/.azure-pipelines/github-release/npm-cache |
35 |
| - npm install |
36 |
| - displayName: Prepare to create GitHub Release |
37 |
| - workingDirectory: '$(Build.SourcesDirectory)/.azure-pipelines/github-release' |
38 |
| -- bash: | |
39 |
| - SCRIPT=.azure-pipelines/github-release/github-release.js |
40 |
| - VSIX=*.vsix |
41 |
| - VERSION=$(node -p "require('./package.json').version") |
42 |
| - node $SCRIPT $VSIX $VERSION $GITHUB_TOKEN |
43 |
| - displayName: Create GitHub Release |
44 |
| - env: |
45 |
| - GITHUB_TOKEN: $(GitHubSecret) |
| 69 | + # create a GitHub Release |
| 70 | + - bash: | |
| 71 | + export npm_config_cache=$(Build.SourcesDirectory)/.azure-pipelines/github-release/npm-cache |
| 72 | + npm install |
| 73 | + displayName: Prepare to create GitHub Release |
| 74 | + workingDirectory: '$(Build.SourcesDirectory)/.azure-pipelines/github-release' |
| 75 | + - bash: | |
| 76 | + SCRIPT=.azure-pipelines/github-release/github-release.js |
| 77 | + VSIX=*.vsix |
| 78 | + VERSION=$(node -p "require('./package.json').version") |
| 79 | + node $SCRIPT $VSIX $VERSION $GITHUB_TOKEN |
| 80 | + displayName: Create GitHub Release |
| 81 | + env: |
| 82 | + GITHUB_TOKEN: $(GitHubSecret) |
0 commit comments