-
Notifications
You must be signed in to change notification settings - Fork 453
Description
Actually some tools requires to be ran with the directory structures.
Example from terraform:
https://www.terraform.io/guides/running-terraform-in-automation.html
Terraform currently makes some assumptions which must be accommodated by such an automation setup:
The saved plan file can contain absolute paths to child modules and other data files referred to by configuration. Therefore it is necessary to ensure that the archived configuration is extracted at an identical absolute path. This is most commonly achieved by running Terraform in some sort of isolation, such as a Docker container, where the filesystem layout can be controlled.
but out worker working directory is not deterministic:
// Setup working directory
pbJobPath := path.Join(fmt.Sprintf("%d", jobInfo.Number),
fmt.Sprintf("%d", jobInfo.SubNumber),
fmt.Sprintf("%d", jobInfo.NodeJobRun.ID),
fmt.Sprintf("%d", jobInfo.NodeJobRun.Job.PipelineActionID))
wd := workingDirectory(w.basedir, pbJobPath)we should have to refactor this to be able to have always the same working directory (for the same workermodel)