Closed Dinesh-chekuru closed 1 year ago
Hi @Dinesh-chekuru , could you share the screenshot? It's not clear from the plain text. I can't tell which part is the script and which part is the log. Do you use a Azure PowerShell version 5.1? Could you use a latest one, e.g., 10.0.0? And have you tried the powershell script directly, instead of Azure PowerShell? Since it's not related to Azure PowerShell. Refer to Building and testing PowerShell.
Hi @YanaXu I'm unable to attach screen shot in this chat. I'm sharing the script below which I'm using clearly. please let me know your thoughts on the below script.
name: Azure PowerShell Action uses: Azure/powershell@v1 with: inlineScript: | [System.Collections.ArrayList]$E = (get-childitem -path ".\dev").name $E.remove("trigger") copy-item -path ".\dev*" -destination ".\prod" -Recurse -Force Write-Output "File copy process completed." azPSVersion: latest errorActionPreference: Stop
I tried with latest and 10.0.0 Azure powershell version but still unable to see the expected output. From the above script my pipeline is running successfully but I'm unable to see content copied from one folder to another folder. Please help me on this issue.
@Dinesh-chekuru, can you ping me on teams? You can find my contact mail in profile.
@YanaXu could you please ping me on teams on the below Id as I'm unable to find your email id in teams. Apologies that I'm unable to find you in teams or email. My Id - dchekuru@coca-cola.com
Hi @Dinesh-chekuru , can you see my message on teams?
I'm trying to copy files from one folder to another folder in github branch by ignoring one folder(trigger) using below powershell script
name: Azure PowerShell Action uses: Azure/powershell@v1 with:
Specify the Az PowerShell script here. inlineScript: | [System.Collections.ArrayList]$E = (get-childitem -path ".\dev").name $E.remove("trigger") copy-item -path ".\dev*" -destination ".\prod" -Recurse -Force Write-Output "File copy process completed."
Azure PS version to be used to execute the script, example: 1.8.0, 2.8.0, 3.4.0. To use the latest version, specify "latest". azPSVersion: 5.1
Select the value of the ErrorActionPreference variable for executing the script. Options: stop, continue, silentlyContinue. Default is Stop. errorActionPreference: Stop From the above script my pipeline is running successfully but I'm unable to see content copied from one folder to another folder. Please help me on this issue.