diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index c14b079a3dec..54ce7bbfc9d5 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -199,7 +199,6 @@ jobs: filePath: $(Build.SourcesDirectory)/eng/scripts/Save-Package-Namespaces-Property.ps1 arguments: > -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) - -ArtifactsList ('$(ArtifactsJson)' | ConvertFrom-Json) pwsh: true workingDirectory: $(Pipeline.Workspace) displayName: Update package properties with namespaces diff --git a/eng/scripts/Save-Package-Namespaces-Property.ps1 b/eng/scripts/Save-Package-Namespaces-Property.ps1 index 5da0a1e5547a..479f1714a642 100644 --- a/eng/scripts/Save-Package-Namespaces-Property.ps1 +++ b/eng/scripts/Save-Package-Namespaces-Property.ps1 @@ -18,54 +18,48 @@ libraries are com.azure.spring and their javadoc jars will be under that subdire but azure-spring-data-cosmos' GroupId is com.azure and its javadoc jar will be under com.azure. -.PARAMETER ArtifactsList -The list of artifacts to gather namespaces for, this is only done for libraries that are -producing docs. --ArtifactsList ('$(ArtifactsJson)' | ConvertFrom-Json) +The ArtifactStagingDirectory + #> [CmdletBinding()] Param ( [Parameter(Mandatory = $True)] - [string] $ArtifactStagingDirectory, - [Parameter(Mandatory=$true)] - [array] $ArtifactsList + [string] $ArtifactStagingDirectory ) -$ArtifactsList = $ArtifactsList | Where-Object -Not "skipPublishDocMs" - . (Join-Path $PSScriptRoot ".." common scripts common.ps1) -if (-not $ArtifactsList) { - Write-Host "ArtifactsList is empty, nothing to process. This can happen if skipPublishDocMs is set to true for all libraries being built." - exit 0 -} - Write-Host "ArtifactStagingDirectory=$ArtifactStagingDirectory" if (-not (Test-Path -Path $ArtifactStagingDirectory)) { LogError "ArtifactStagingDirectory '$ArtifactStagingDirectory' does not exist." exit 1 } -Write-Host "" -Write-Host "ArtifactsList:" -$ArtifactsList | Format-Table -Property GroupId, Name, ReleaseInBatch | Out-String | Write-Host - $packageInfoDirectory = Join-Path $ArtifactStagingDirectory "PackageInfo" $foundError = $false # At this point the packageInfo files should have been already been created. -# The only thing being done here is adding or updating namespaces for libraries -# that will be producing docs. This ArtifactsList is -foreach($artifact in $ArtifactsList) { - if ($artifact.ReleaseInBatch -eq $false) { - Write-Host "Skipping $($artifact.Name) as it is not being released in this batch." - continue - } +$packageInfoFiles = Get-ChildItem -Path $packageInfoDirectory -File -Filter "*.json" - # Get the version from the packageInfo file - $packageInfoFile = Join-Path $packageInfoDirectory "$($artifact.Name).json" +foreach($packageInfoFile in $packageInfoFiles) { Write-Host "processing $($packageInfoFile.FullName)" $packageInfo = ConvertFrom-Json (Get-Content $packageInfoFile -Raw) + + # ArtifactDetails will be null for AdditionalModules + if ($packageInfo.ArtifactDetails) { + # If skipPublishDocMs isn't there, then by default docs are being published for that library + if ($packageInfo.ArtifactDetails.PSobject.Properties.Name -contains "skipPublishDocMs") { + # If skipPublishDocMs is there and it's true, then skip publishing + if ($packageInfo.ArtifactDetails.skipPublishDocMs) { + Write-Host "Skipping DocsMS publishing for $($packageInfo.Name). skipPublishDocMs is set to false." + continue + } + } + } else { + Write-Host "Skipping DocsMS publishing for $($packageInfo.Name). ArtifactDetails is null meaning this is an AdditionalModule" + continue + } + $version = $packageInfo.Version # If the dev version is set, use that. This will be set for nightly builds if ($packageInfo.DevVersion) { diff --git a/eng/scripts/generate_from_source_pom.py b/eng/scripts/generate_from_source_pom.py index e66a47c66bea..d824ce28b28e 100644 --- a/eng/scripts/generate_from_source_pom.py +++ b/eng/scripts/generate_from_source_pom.py @@ -59,6 +59,11 @@ def create_from_source_pom(artifacts_list: str, additional_modules_list: str, se additional_modules_identifiers = [] if additional_modules_list is not None: additional_modules_identifiers = additional_modules_list.split(',') + # Combine the lists so dependencies are calculated correctly. While there + # should be no duplicates between the artifacts list and additional modules, + # it's better to be safe. This will remove the duplicates + combined_list = artifacts_list_identifiers + additional_modules_identifiers + artifacts_list_identifiers = list(set(combined_list)) # Get the artifact identifiers from client_versions.txt to act as our source of truth. artifact_identifier_to_version = load_client_artifact_identifiers() @@ -83,7 +88,6 @@ def create_from_source_pom(artifacts_list: str, additional_modules_list: str, se # Finally map the project identifiers to projects. add_source_projects(source_projects, artifacts_list_identifiers, projects) - add_source_projects(source_projects, additional_modules_identifiers, projects) add_source_projects(source_projects, dependent_modules, projects) add_source_projects(source_projects, dependency_modules, projects) diff --git a/sdk/aot/ci.yml b/sdk/aot/ci.yml index ec9bd4286dcd..727a0bbf5fec 100644 --- a/sdk/aot/ci.yml +++ b/sdk/aot/ci.yml @@ -57,3 +57,5 @@ extends: AdditionalModules: - name: azure-aot-graalvm-perf groupId: com.azure + - name: azure-aot-graalvm-samples + groupId: com.azure diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index ce81dbf67f6d..a8270f27442e 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -163,6 +163,8 @@ extends: safeName: azurecoretracingopentelemetry releaseInBatch: ${{ parameters.release_azurecoretracingopentelemetry }} AdditionalModules: + - name: azure-core-tracing-opentelemetry-samples + groupId: com.azure - name: azure-core-perf groupId: com.azure # required by the above perf library diff --git a/sdk/identity/ci.yml b/sdk/identity/ci.yml index a9be537aebd4..80a8b5008982 100644 --- a/sdk/identity/ci.yml +++ b/sdk/identity/ci.yml @@ -63,6 +63,8 @@ extends: safeName: azureidentitybroker releaseInBatch: ${{ parameters.release_azureidentitybroker }} AdditionalModules: + - name: azure-identity-broker-samples + groupId: com.azure - name: azure-identity-perf groupId: com.azure # required by the above perf library diff --git a/sdk/identity/pom.xml b/sdk/identity/pom.xml index 5a549f260fbd..0529fb94765c 100644 --- a/sdk/identity/pom.xml +++ b/sdk/identity/pom.xml @@ -15,15 +15,11 @@ - azure-identity - azure-identity-perf - azure-identity-extensions - azure-identity-broker - + azure-identity-broker-samples