-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
177 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,28 +6,41 @@ | |
trigger: | ||
- v2 | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '10.x' | ||
displayName: 'Install Node.js' | ||
|
||
- script: | | ||
npm install -g [email protected] | ||
# npm install | ||
npm install | ||
rc=$?; if [ $rc -ne 0 ]; then exit $rc ; fi | ||
# build packages | ||
npm run publish-preview | ||
# publish autorest core to a github release. | ||
v=`dir src/autorest-core/*.tgz | sed 's/.*\(2\.0\..*\)\.tgz/\1/g'` | ||
publish-release --token $(azuresdk-github-pat) --repo autorest --owner azure --name autorest-core-$v --tag autorest-core-$v --notes='v2 prerelease build' --prerelease --editRelease false --assets ./src/autorest-core/microsoft.azure-autorest-core-$v.tgz --target_commitish $(Build.SourceBranchName) | ||
rc=$?; if [ $rc -ne 0 ]; then exit $rc ; fi | ||
cd .. | ||
extends: | ||
template: /eng/pipelines/templates/1es-redirect.yml | ||
parameters: | ||
stages: | ||
- stage: Publish_Stage | ||
variables: | ||
- template: /eng/pipelines/templates/variables/image.yml | ||
jobs: | ||
- job: | ||
displayName: NPM Publishing | ||
|
||
pool: | ||
name: $(LINUXNEXTPOOL) | ||
image: $(LINUXNEXTVMIMAGE) | ||
os: linux | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '10.x' | ||
displayName: 'Install Node.js' | ||
|
||
- script: | | ||
npm install -g [email protected] | ||
# npm install | ||
npm install | ||
rc=$?; if [ $rc -ne 0 ]; then exit $rc ; fi | ||
# build packages | ||
npm run publish-preview | ||
# publish autorest core to a github release. | ||
v=`dir src/autorest-core/*.tgz | sed 's/.*\(2\.0\..*\)\.tgz/\1/g'` | ||
publish-release --token $(azuresdk-github-pat) --repo autorest --owner azure --name autorest-core-$v --tag autorest-core-$v --notes='v2 prerelease build' --prerelease --editRelease false --assets ./src/autorest-core/microsoft.azure-autorest-core-$v.tgz --target_commitish $(Build.SourceBranchName) | ||
rc=$?; if [ $rc -ne 0 ]; then exit $rc ; fi | ||
cd .. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"tool": "Credential Scanner", | ||
"suppressions": [ | ||
{ | ||
"placeholder": [ | ||
"#################", | ||
"P@$$w0rd" | ||
], | ||
"_justification": "Secrets used by test code or documentation, they are fake." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
resources: | ||
repositories: | ||
- repository: 1ESPipelineTemplates | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
|
||
parameters: | ||
- name: stages | ||
type: stageList | ||
default: [] | ||
- name: variables | ||
type: object | ||
default: {} | ||
- name: Use1ESOfficial | ||
type: boolean | ||
default: true | ||
|
||
extends: | ||
${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}: | ||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates | ||
${{ else }}: | ||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates | ||
parameters: | ||
settings: | ||
skipBuildTagsForGitHubPullRequests: true | ||
sdl: | ||
git: | ||
longpaths: true | ||
sourceAnalysisPool: | ||
name: azsdk-pool-mms-win-2022-general | ||
image: azsdk-pool-mms-win-2022-1espt | ||
os: windows | ||
psscriptanalyzer: | ||
compiled: true | ||
break: true | ||
credscan: | ||
suppressionsFile: $(Build.SourcesDirectory)/eng/CredScanSuppression.json | ||
eslint: | ||
enabled: false | ||
justificationForDisabling: "ESLint injected task has failures because it uses an old version of mkdirp. We should not fail for tools not controlled by the repo. See: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3556850" | ||
stages: | ||
- ${{ each stage in parameters.stages }}: | ||
- ${{ each pair in stage }}: | ||
${{ if ne(pair.key, 'variables') }}: | ||
${{ pair.key }}: ${{ pair.value }} | ||
variables: | ||
- template: /eng/pipelines/templates/variables/image.yml@self | ||
- ${{ each variable in parameters.variables }}: | ||
- ${{ if eq(variable.key, 'template') }}: | ||
- template: ${{ variable.value }} | ||
- ${{ else }}: | ||
- name: ${{ coalesce(variable.key, variable.name) }} | ||
value: ${{ variable.value }} | ||
- ${{ each variable in stage.variables }}: | ||
- ${{ if in(variable.key, 'template', 'group') }}: | ||
- ${{ variable.key }}: ${{ variable.value }} | ||
- ${{ else }}: | ||
- name: ${{ coalesce(variable.key, variable.name) }} | ||
value: ${{ variable.value }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
variables: | ||
- name: LINUXPOOL | ||
value: azsdk-pool-mms-ubuntu-2004-general | ||
- name: LINUXNEXTPOOL | ||
value: azsdk-pool-mms-ubuntu-2204-general | ||
- name: WINDOWSPOOL | ||
value: azsdk-pool-mms-win-2022-general | ||
- name: MACPOOL | ||
value: Azure Pipelines | ||
|
||
- name: LINUXVMIMAGE | ||
value: azsdk-pool-mms-ubuntu-2004-1espt | ||
- name: LINUXNEXTVMIMAGE | ||
value: azsdk-pool-mms-ubuntu-2204-1espt | ||
- name: WINDOWSVMIMAGE | ||
value: azsdk-pool-mms-win-2022-1espt | ||
- name: MACVMIMAGE | ||
value: macos-11 | ||
|
||
# Values required for pool.os field in 1es pipeline templates | ||
- name: LINUXOS | ||
value: linux | ||
- name: WINDOWSOS | ||
value: windows | ||
- name: MACOS | ||
value: macOS |