Skip to content

Commit b578555

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

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

.pipelines/SecretManagement-Official.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,10 @@ extends:
216216
search_root: '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell'
217217
- download: current
218218
displayName: Download artifacts
219-
- pwsh: |
220-
$modulePath = Join-Path $(drop) -ChildPath 'Microsoft.PowerShell.SecretManagement.$(version).nupkg'
221-
$fileExists = Test-Path $modulePath
222-
Write-Verbose -Verbose "Module file $modulePath Exists: $fileExists"
223-
224-
$srcDir = Join-Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot' -ChildPath 'SrcFiles'
225-
New-Item $srcDir -ItemType Directory
226-
227-
$dest = Join-Path $srcDir -ChildPath 'Microsoft.PowerShell.SecretManagement.$(version).nupkg'
228-
Copy-Item -Path $modulePath -Destination $dest
229-
230-
Get-ChildItem '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/'
231-
displayName: Move artifact to Ev2 folder
219+
- task: CopyFiles@2
220+
SourceFolder: $(drop)
221+
Contents: Microsoft.PowerShell.SecretManagement.$(version).nupkg
222+
TargetFolder: $(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/SrcFiles/
232223
- pwsh: |
233224
$srcPath = Join-Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot' -ChildPath 'Shell'
234225
$pathToRunTarFile = Join-Path '$(Build.SourcesDirectory)/EV2Specs/ServiceGroupRoot/Shell' -ChildPath "Run.tar"

0 commit comments

Comments
 (0)