jenkinsci / jenkinsci/packer-plugin

Change to Directory

Open
#10 9 comments 0 reactions 1 assignee Claimed by @jdamick View on GitHub
Dominant language
Java
Stars
24
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi,
Trying to use "Change to Directory" (see attached screen shot)
I put in the directory the json file and an shell script.
The sh is referred in the json relatively.
I'm getting the following error

```
14:39:56 FATAL: Execution failed: /home/ubuntu/tools/biz.neustar.jenkins.plugins.packer.PackerInstallation/packer_0.9/packer build -var vpc_id=vpc-*** -var subnet_id=subnet-*** -debug /home/ubuntu/workspace/CreativeAdminBackend-BakeAMI-plugin/app-ami-packer.json
```

in the jenkins log I can see

```
launch: /home/ubuntu/tools/biz.neustar.jenkins.plugins.packer.PackerInstallation/packer_0.9/packer build -var vpc_id=*** -var subnet_id=subnet-*** -debug /home/ubuntu/workspace/CreativeAdminBackend-BakeAMI-plugin/app-ami-packer.json
java.io.IOException: Cannot run program "/home/ubuntu/tools/biz.neustar.jenkins.plugins.packer.PackerInstallation/packer_0.9/packer" (in directory "deployment"): error=2, No such file or directory
```

the folder which the json file is being looked for is the workspce dir.
*The method PackerPublisher.workingDir is returning the name of the ChangeDir and not the full path of it.
which means that the "Change to Directory" is not actually working or I don't understand its meaning.

![image](https://cloud.githubusercontent.com/assets/702139/13379222/53256cc8-de28-11e5-99d2-d4855b79dd5c.png)

Regards, Avihay
(Thank you for the plugin)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.