constantcontact / jenkins_pipeline_builder

YAML/JSON driven jenkins job generator that lets you version your artifact pipelines alongside with the artifact source itself.
MIT License
62 stars 43 forks source link

Remote template resolution attempts to use folders in the parent directroy #129

Open dtyler opened 6 years ago

dtyler commented 6 years ago

When attempting to resolve a remote dependency for templates, the pipeline builder searches the expanded remote archive for the specified folder to load. The search looks at all directories in the directory where the archive was expanded including the reference to the parent directory: '..'.

Because of this behavior, the if the current working directory where the Jenkins Pipeline Builder is run contains a folder with the same name as the desired folder, then this folder is incorrectly targeted for loading.

Scenario: Project file specifies loading remote templates and the specified folder name to load matches that of an other folder in the current working directory.

Expected behavior: JPB should find and load the specified folder from the remote archive and the template therein.

Current behavior: JPB find the folder in the current working directory (outside the expanded archive) and attempts to load a template from there.