x
login Signup

Get path from previous step in ElectricFlow

I have:
1. Uploaded artifact as a zip file
2. Created:
2.1. An application
2.2. A Tier
2.3. A Component, pointing to the artifact

Then I try to set up an application process where I:
1. Retrieve artifact
2. Unzip artifact to given directory

Question:
How can I, from the first step, fetch the path to the retrieved artifact and use it in "Zip file" in the second step (Step type: Plugins - Utility - FileOps - Unzip file)?

avatar image By devop123 15 asked Jul 10 at 03:55 PM
more ▼
(comments are locked)
10|750 characters needed characters left

1 answer: sort voted first

In the component definition, you can choose a retrieve to location or use "Retrieved Artifact Location Property" whose default value is:

 /myJob/retrievedArtifactVersions/$[assignedResourceName]

You can use the dereferenced value to find your zip file:

 $[/myJob/retrievedArtifactVersions/$[assignedResourceName]]/cacheLocation

For example, this might resolve to something like:

 /myJob/retrievedArtifactVersions/QA_Tomcat/com.mycompany.dslide:App_comp/cacheLocation

with a value of

 /opt/electriccloud/electriccommander/artifact-cache/com.mycompany.dslide/App_comp/1.35



avatar image By gregm 2k answered Jul 10 at 06:38 PM
more ▼
(comments are locked)
10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.