build immutable image from packer task in azure devops pipeline

Copper Contributor

I am using build immutable image task for running packer template . I am unable to find way to copy  package from $(System.defaultWorkingDirectory) workspace  and pass to packer template in provisionar file source path. As if i use $(System.defaultWorkingDirectory) in one task and pass  this directory location in packer source file then this location is again cleaned in packer  build task . 


I want to find a way to consume artifact downloaded under $(System.defaultWorkingDirectory) in one task and pass that artifact to copy on virtual machine in another task with in the same job. but every time new task runs it cleans this $(System.defaultWorkingDirectory) location so my last downloaded artifacts under this $(System.defaultWorkingDirectory) location get cleaned and is not available to refer in another task.

0 Replies