Skip to content

Commit 3f2e971

Browse files
committed
ci: avoids zipping directory
Signed-off-by: Vincent Biret <[email protected]>
1 parent 2dacc60 commit 3f2e971

File tree

2 files changed

+8
-48
lines changed

2 files changed

+8
-48
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,23 @@ extends:
100100
displayName: Inspect contents of local Maven cache
101101
102102
- pwsh: |
103-
.\scripts\zipPackageContent.ps1 -OutputDirectory $Env:OUTPUT_DIRECTORY -ArtifactId microsoft-graph-core -Version $(PACKAGE_VERSION)
104-
echo "list of zips:"
105-
Get-ChildItem -Path $Env:OUTPUT_DIRECTORY -Filter "*.zip" | ForEach-Object { Write-Host $_.FullName }
106-
displayName: Zip contents of local Maven cache
107-
env:
108-
OUTPUT_DIRECTORY: $(Build.ArtifactStagingDirectory)
103+
$packageFullPath = Join-Path -Path "./" -ChildPath "build/publishing-repository/com.microsoft.graph/microsoft-graph-core" -AdditionalChildPath "$(PACKAGE_VERSION)"
104+
echo "Package full path: $packageFullPath"
105+
echo "##vso[task.setvariable variable=PACKAGE_PATH;]$packageFullPath"
106+
displayName: Get the package full path
109107
110108
- task: 1ES.PublishPipelineArtifact@1
111109
displayName: "Publish Artifact: jars"
112110
inputs:
113111
artifactName: jars
114-
targetPath: "$(Build.ArtifactStagingDirectory)"
112+
targetPath: "$(PACKAGE_PATH)"
115113

116114
- stage: deploy
117115
# condition: and(or(contains(variables['build.sourceBranch'], 'refs/tags/v'), eq(variables['build.sourceBranch'], '${{ parameters.previewBranch }}')), succeeded())
118116
dependsOn: build
119117
jobs:
120118
- deployment: deploy_github
121-
condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
119+
# condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
122120
pool:
123121
name: Azure-Pipelines-1ESPT-ExDShared
124122
os: linux
@@ -136,7 +134,7 @@ extends:
136134
deploy:
137135
steps:
138136
- pwsh: |
139-
$zips = Get-ChildItem -Path "$(Pipeline.Workspace)" -Filter "*.zip"
137+
$zips = Get-ChildItem -Path "$(Pipeline.Workspace)" -Filter "*.jar"
140138
$zip = $zips | Select-Object -First 1
141139
$zipName = $zip.Name
142140
if ($zipName -match "\d+.\d+.\d+")
@@ -147,19 +145,10 @@ extends:
147145
}
148146
else
149147
{
150-
Write-Error "No valid version found in zip file name."
148+
Write-Error "No valid version found in jar file name."
151149
exit 1
152150
}
153151
154-
- pwsh: |
155-
$zips = Get-ChildItem -Path "$(Pipeline.Workspace)" -Filter "*.zip"
156-
foreach ($zip in $zips) {
157-
$targetPath = $zip.FullName.Replace(".zip", "")
158-
Expand-Archive -Path $zip.FullName -DestinationPath $targetPath
159-
Remove-Item -Path $zip.FullName -Force
160-
}
161-
displayName: Unzip artifacts
162-
163152
- task: GitHubRelease@1
164153
inputs:
165154
gitHubConnection: "microsoftkiota"

scripts/zipPackageContent.ps1

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

0 commit comments

Comments
 (0)