Skip to content

Commit 49c6126

Browse files
Use archive file to simplify pipeline
Co-authored-by: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>
1 parent b578555 commit 49c6126

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.pipelines/SecretManagement-Official.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,13 @@ extends:
220220
SourceFolder: $(drop)
221221
Contents: Microsoft.PowerShell.SecretManagement.$(version).nupkg
222222
TargetFolder: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
223-
- pwsh: |
224-
$srcPath = Join-Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot' -ChildPath 'Shell'
225-
$pathToRunTarFile = Join-Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell' -ChildPath "Run.tar"
226-
tar -cvf $pathToRunTarFile -C $srcPath ./Run
227-
$tarExists = Test-Path $pathToRunTarFile
228-
Write-Verbose -Verbose "Tar file $pathToRunTarFile exists: $tarExists"
223+
- task: ArchiveFiles@2
224+
inputs:
225+
rootFolderOrFile: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run
226+
includeRootFolder: false
227+
archiveType: tar
228+
tarCompression: None
229+
archiveFile: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell/Run.tar
229230
displayName: Compress Run script into tar file as needed for EV2 Shell extension
230231
- pwsh: |
231232
$pathToJsonFile = Join-Path -Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot' -ChildPath 'SecretManagementToACR.Rollout.json'

0 commit comments

Comments
 (0)