Skip to content

Commit 18534e0

Browse files
Use common API create template and reorder step exeuction (Azure#19771)
* Use common API review create step and reorder step
1 parent 23b603e commit 18534e0

File tree

3 files changed

+15
-32
lines changed

3 files changed

+15
-32
lines changed

eng/pipelines/templates/jobs/ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,17 @@ jobs:
117117
-TargetDirectory $(Build.ArtifactStagingDirectory)
118118
-InformationAction Continue
119119
120-
- publish: $(Build.ArtifactStagingDirectory)
121-
displayName: 'Publish Artifacts $(ArtifactName)'
122-
artifact: '$(ArtifactName)'
123-
124-
- template: ../steps/upload-repository-on-failure.yml
125-
126-
- template: /eng/pipelines/templates/steps/create-apireview.yml
120+
- template: /eng/common/pipelines/templates/steps/create-apireview.yml
127121
parameters:
128122
Artifacts: ${{parameters.Artifacts}}
129123

124+
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
125+
parameters:
126+
ArtifactPath: $(Build.ArtifactStagingDirectory)
127+
ArtifactName: '$(ArtifactName)'
128+
129+
- template: ../steps/upload-repository-on-failure.yml
130+
130131
- job: 'Analyze'
131132
condition: and(succeeded(), ne(variables['Skip.Analyze'], 'true'))
132133

eng/pipelines/templates/steps/create-apireview.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

eng/scripts/Language-Settings.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,21 @@ function Update-java-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$nu
243243
}
244244

245245
# function is used to filter packages to submit to API view tool
246-
function Find-java-Artifacts-For-Apireview($artifactDir, $pkgName = "")
246+
function Find-java-Artifacts-For-Apireview($artifactDir, $pkgName)
247247
{
248-
Write-Host "Checking for source jar in artifact path $($artifactDir)"
249248
# Find all source jar files in given artifact directory
250-
$files = Get-ChildItem "${artifactDir}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}
249+
# Filter for package in "com.azure*" groupid.
250+
$artifactPath = Join-Path $artifactDir "com.azure*" $pkgName
251+
Write-Host "Checking for source jar in artifact path $($artifactPath)"
252+
$files = Get-ChildItem -Recurse "${artifactPath}" | Where-Object -FilterScript {$_.Name.EndsWith("sources.jar")}
251253
if (!$files)
252254
{
253-
Write-Host "$($artifactDir) does not have any package"
255+
Write-Host "$($artifactPath) does not have any package"
254256
return $null
255257
}
256258
elseif($files.Count -ne 1)
257259
{
258-
Write-Host "$($artifactDir) should contain only one (1) published source jar package"
260+
Write-Host "$($artifactPath) should contain only one (1) published source jar package"
259261
Write-Host "No of Packages $($files.Count)"
260262
return $null
261263
}

0 commit comments

Comments
 (0)