Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions common/config/rush/common-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
// @azure/event-processor-host is on a much lower major version
"@azure/ms-rest-nodeauth": ["^0.9.2"],
// Idenity is moving from v1 to v2. Moving all packages to v2 is going to take a bit of time, in the mean time we could use v2 on the perf-identity tests.
"@azure/identity": ["2.0.0-beta.3", "^1.1.0"],
"@azure/identity": ["^2.0.0-beta.4", "2.0.0-beta.3", "^1.1.0"],
// App Config uses keyvault-secrets in a sample, switch to latest once the preview becomes GA
// Issue #14771 tracks updating to these versions
"@microsoft/api-extractor": ["7.13.2"],
"prettier": ["2.2.1"]
"prettier": ["2.2.1"],
// All packages should move to 1.0.0-preview.12 once core-rest-pipeline 1.1.0 GAs
"@azure/core-tracing": ["1.0.0-preview.11"]
}
}
930 changes: 491 additions & 439 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eng/common/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Common Engineering System

Updates under this directory should only be made in the `azure-sdk-tools` repo as any changes under this directory outside of that repo will end up getting overwritten with future updates. For information about making updates see [common engineering system docs](https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md)
Updates under this directory should only be made in the `azure-sdk-tools` repo as any changes under this directory outside of that repo will end up getting overwritten with future updates. For information about making updates see [common engineering system docs](https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md)
2 changes: 1 addition & 1 deletion eng/common/docgeneration/Generate-DocIndex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,5 @@ else
{
LogWarning "The function for 'GetGithubIoDocIndexFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
}
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/steps/check-spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# and some ref (branch, tag, etc.) or commit hash. Only runs on PRs.
# ContinueOnError - true: Pipeline warns on spelling error
# false: Pipeline fails on spelling error
# TargetBranch - Target ref (e.g. master) to compare to create file change
# TargetBranch - Target ref (e.g. main) to compare to create file change
# list.
# CspellConfigPath - Path to cspell.json config location

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameters:
default: ''
- name: PRBranchName
type: string
default: 'master-rdme'
default: 'main-rdme'
- name: PRLabels
type: string
default: 'auto-merge'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
if (($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0))
{
Write-Host "##vso[task.LogIssue type=error;]Changes to files under 'eng/common' directory should not be made in this Repo`n${filesInCommonDir}"
Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md"
Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md"
exit 1
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
- script: >
dotnet tool install
Azure.Sdk.Tools.PipelineGenerator
--version 1.0.2-dev.20210309.1
--version 1.0.2-dev.20210621.4
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk/nuget/v3/index.json
--tool-path ${{parameters.ToolPath}}
workingDirectory: $(Pipeline.Workspace)/pipeline-generator
Expand Down
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/set-default-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ steps:
- pwsh: |
$setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
if ($LASTEXITCODE -ne 0) {
Write-Host "Not able to fetch the default branch from git command. Set to master."
$setDefaultBranch = 'master'
Write-Host "Not able to fetch the default branch from git command. Set to main."
$setDefaultBranch = 'main'
}
Write-Host "Setting DefaultBranch=$setDefaultBranch"
Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch"
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ else
{
Write-Host "The function for 'FindArtifactForApiReviewFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
exit(1)
}

Expand Down Expand Up @@ -104,7 +104,7 @@ if ($packages)
Write-Host "Version: $($version)"
Write-Host "SDK Type: $($pkgInfo.SdkType)"

# Run create review step only if build is triggered from master branch or if version is GA.
# Run create review step only if build is triggered from main branch or if version is GA.
# This is to avoid invalidating review status by a build triggered from feature branch
if ( ($SourceBranch -eq $DefaultBranch) -or (-not $version.IsPrerelease))
{
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function Get-AllPkgProperties ([string]$ServiceDirectory = $null)
return $pkgPropsResult
}

# Given the metadata url under https://github.com/Azure/azure-sdk/tree/master/_data/releases/latest,
# Given the metadata url under https://github.com/Azure/azure-sdk/tree/main/_data/releases/latest,
# the function will return the csv metadata back as part of response.
function Get-CSVMetadata ([string]$MetadataUri=$MetadataUri)
{
Expand All @@ -143,7 +143,7 @@ function Get-PkgPropsForEntireService ($serviceDirectoryPath)
{
LogError "The function for '$GetPackageInfoFromRepoFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
}

foreach ($directory in (Get-ChildItem $serviceDirectoryPath -Directory))
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Prepare-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ else
{
LogError "The function 'SetPackageVersion' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Update-DocsMsPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ if ($UpdateDocsMsPackagesFn -and (Test-Path "Function:$UpdateDocsMsPackagesFn"))
} else {
LogError "The function for '$UpdateFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
exit 1
}
2 changes: 1 addition & 1 deletion eng/common/scripts/artifact-metadata-parsing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function RetrievePackages($artifactLocation) {
{
LogError "The function for '$GetPackageInfoFromPackageFileFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
}
}

Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/copy-docs-to-blobstorage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,6 @@ else
{
LogWarning "The function for '$PublishGithubIODocsFn' was not found.`
Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.`
See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure"
See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md#code-structure"
}

2 changes: 1 addition & 1 deletion eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ param (

. (Join-Path $PSScriptRoot common.ps1)

$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master"
$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)main"

function GetMetaData {
if (Test-Path Variable:MetadataUri) {
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/mgmt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ trigger:
branches:
include:
- master
- main
paths:
include:
- eng/pipelines/mgmt-pr.yml
Expand Down Expand Up @@ -220,7 +221,7 @@ jobs:
inputs:
verbose: false

- script: 'gulp pack --base-reference=master --head-reference=master'
- script: 'gulp pack --base-reference=main --head-reference=main'
displayName: 'gulp pack'

- task: CopyFiles@2
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- script: |
echo "##vso[build.addbuildtag]Scheduled"
displayName: "Tag scheduled builds"
condition: and(always(),and(eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule')))
condition: and(always(),and(eq(variables['Build.SourceBranchName'],'main'),eq(variables['Build.Reason'],'Schedule')))

- template: ../steps/common.yml

Expand Down
43 changes: 9 additions & 34 deletions eng/pipelines/templates/stages/archetype-js-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ parameters:
DependsOn: Build
Registry: 'https://registry.npmjs.org/'
PrivateRegistry: 'https://pkgs.dev.azure.com/azure-sdk/internal/_packaging/azure-sdk-for-js-pr/npm/registry/'
DocArtifact: 'documentation'
TargetDocRepoOwner: ''
TargetDocRepoName: ''
ServiceDirectory: ''
Expand Down Expand Up @@ -43,18 +42,13 @@ stages:
PackageName: ${{artifact.name}}
ServiceName: ${{parameters.ServiceDirectory}}
ForRelease: true
- template: /eng/pipelines/templates/steps/stage-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
Get-ChildItem -Recurse ${{parameters.ArtifactName}}/${{artifact.name}}
workingDirectory: $(Pipeline.Workspace)
displayName: Output Visible Artifacts
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
parameters:
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}
PackageRepository: Npm
ReleaseSha: $(Build.SourceVersion)
RepoId: Azure/azure-sdk-for-js
Expand All @@ -77,7 +71,7 @@ stages:
steps:
- checkout: self
- script: |
export DETECTED_PACKAGE_NAME=`ls $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-[0-9]*[0-9]*.[0-9]*.tgz`
export DETECTED_PACKAGE_NAME=`ls $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}/*.tgz`
echo "##vso[task.setvariable variable=Package.Archive]$DETECTED_PACKAGE_NAME"
displayName: Detecting package archive

Expand Down Expand Up @@ -124,13 +118,8 @@ stages:
deploy:
steps:
- checkout: self
- template: /eng/pipelines/templates/steps/stage-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
Get-ChildItem -Recurse ${{parameters.ArtifactName}}/${{artifact.name}}
workingDirectory: $(Pipeline.Workspace)
displayName: Output Visible Artifacts
- template: /eng/common/pipelines/templates/steps/get-pr-owners.yml
Expand All @@ -139,7 +128,7 @@ stages:
ServiceDirectory: ${{parameters.ServiceDirectory}}
- template: /eng/common/pipelines/templates/steps/docs-metadata-release.yml
parameters:
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}
PackageRepository: NPM
ReleaseSha: $(Build.SourceVersion)
RepoId: Azure/azure-sdk-for-js
Expand Down Expand Up @@ -171,30 +160,16 @@ stages:
steps:
- checkout: self
- pwsh: |
$adjustedName = "${{artifact.name}}" -replace "^azure-", ""
Write-Host "##vso[task.setvariable variable=Documentation.Zip]$adjustedName"
displayName: Set Documentation File Name
- template: /eng/pipelines/templates/steps/stage-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*.tgz
- template: /eng/pipelines/templates/steps/stage-artifacts.yml
parameters:
SourceFolder: ${{parameters.DocArtifact}}
TargetFolder: ${{artifact.safeName}}/${{parameters.DocArtifact}}
PackageName: $(Documentation.Zip).zip
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
Get-ChildItem -Recurse ${{parameters.ArtifactName}}/${{artifact.name}}
workingDirectory: $(Pipeline.Workspace)
displayName: Output Visible Artifacts
- template: /eng/common/pipelines/templates/steps/publish-blobs.yml
parameters:
FolderForUpload: '$(Pipeline.Workspace)/${{artifact.safeName}}'
FolderForUpload: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}'
BlobSASKey: '$(azure-sdk-docs-prod-sas)'
BlobName: '$(azure-sdk-docs-prod-blob-name)'
TargetLanguage: 'javascript'
ArtifactLocation: '$(Pipeline.Workspace)/${{artifact.safeName}}'
ArtifactLocation: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}'
# we override the regular script path because we have cloned the build tools repo as a separate artifact.
ScriptPath: 'eng/common/scripts/copy-docs-to-blobstorage.ps1'

Expand Down Expand Up @@ -260,7 +235,7 @@ stages:
- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishDevFeed, 'true')}}:
- pwsh: |
$detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-[0-9]*.[0-9]*.[0-9]*-alpha*.tgz
$detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}/*.tgz
echo "##vso[task.setvariable variable=Package.Archive]$detectedPackageName"
if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-js') {
$npmToken="$(azure-sdk-npm-token)"
Expand Down
35 changes: 16 additions & 19 deletions eng/pipelines/templates/steps/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,25 @@ steps:
Artifacts: ${{ parameters.Artifacts }}
ArtifactPath: $(Build.SourcesDirectory)/sdk/${{ parameters.ServiceDirectory }}

# It's important for performance to pass "sdk" as "sourceFolder" rather than as a prefix in "contents".
# The task first enumerates all files under "sourceFolder", then matches them against the "contents" pattern.
- task: CopyFiles@2
inputs:
sourceFolder: sdk
contents: |
**/$(coalesceResultFilter)/*.tgz
**/$(coalesceResultFilter)/browser/*.zip
targetFolder: $(Build.ArtifactStagingDirectory)
flattenFolders: true
displayName: "Copy packages"

- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'packages'

- template: ../steps/generate-doc.yml
parameters:
ServiceDirectory: ${{parameters.ServiceDirectory}}

- pwsh: |
$artifacts = '${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json
foreach ($artifact in $artifacts)
{
$artifactName = $artifact.name
Write-Host "Copying $artifactName artifacts to $(Build.ArtifactStagingDirectory)/$artifactName"
New-Item -Type Directory -Name $artifactName -Path $(Build.ArtifactStagingDirectory) > $null
Copy-Item sdk/${{parameters.ServiceDirectory}}/**/$artifactName-*.tgz $(Build.ArtifactStagingDirectory)/$artifactName
Copy-Item sdk/${{parameters.ServiceDirectory}}/**/browser/$artifactName-*.zip $(Build.ArtifactStagingDirectory)/$artifactName
New-Item -Type Directory -Name documentation -Path $(Build.ArtifactStagingDirectory)/$artifactName > $null
Copy-Item $(Build.SourcesDirectory)/docGen/$artifactName.zip $(Build.ArtifactStagingDirectory)/$artifactName/documentation
}
displayName: 'Copy Packages'

- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)/Documentation'
ArtifactName: 'documentation'
ArtifactPath: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'packages'
2 changes: 1 addition & 1 deletion eng/pipelines/templates/steps/generate-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ steps:
displayName: "Run Typedoc Docs"

- pwsh: |
$(Build.SourcesDirectory)/eng/tools/compress-subfolders.ps1 "$(Build.SourcesDirectory)/docGen" "$(Build.ArtifactStagingDirectory)/Documentation"
$(Build.SourcesDirectory)/eng/tools/compress-subfolders.ps1 "$(Build.SourcesDirectory)/docGen" "$(Build.SourcesDirectory)/docGen"
displayName: "Generate Typedoc Docs"
10 changes: 0 additions & 10 deletions eng/pipelines/templates/steps/stage-artifacts.yml

This file was deleted.

Loading