Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
HOWTO Get the list of files in Artifact ?
-
Hello
I am looking for a simple way to list the files for an Artifact.
The goal is to deploy (msdeploy) the zip files which are in the Artifact.
I am trying to use PSEval function but I have pb with scalar or vector type value and I get lost
The Powershell is very simple :
(get-childitem $DossierArtifact | where {$_.extension -eq ".zip"}).NameI wish I had a function like
@ListFilesInArtifact($ArtifactName,$BuildNumber, $ReleaseaNumber,$filter)to make the development easier
Any help is welcome - Maybe it is the documentraiton, but I did not found it.
PhilippeC.
-
Hi @PhilippeC
You could create a PowerShell script in BuildMaster and call that from your Otter Script Plan. Here is an example:
PowerShell Script
param ([string] $Path, [ref] $ArtifactFiles) $files = @() foreach($name in (get-childitem $Path | where {$_.extension -eq ".zip"}).Name) { $files += $name } $ArtifactFiles = $filesOtter Script Plan:
Deploy-Artifact Files ( To: target ); PSCall AppName::GetZipFiles ( Path: target, ArtifactFils => @files ); foreach $file in @files { # Do something with $file }Hope this helps!
Thanks,
Rich -
Hello Rich
It is very kind.
This was exactly what looking for.
Thanks a lot
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login