jenkinsci / jenkinsci/packer-plugin

Loading packer plug-ins issue

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
24
Forks
14
PR merge metrics
No merged PRs in 30d

Description

As part of using the packer plug-in for Jenkins I am attempting to load a packer plug-in (https://github.com/jetbrains-infra/packer-builder-vsphere) prior to running the packer build.

I am downloading and making the plug-in executable as an Execute shell command:

`curl "https://github.com/jetbrains-infra/packer-builder-vsphere/releases/download/v1.5/packer-builder-vsphere.linux" > "packer-builder-vsphere.linux"

chmod +x /var/lib/jenkins/jobs/accosia3/workspace/packer-builder-vsphere.linux
ls -l`

This works as expected:

`+ pwd

/var/lib/jenkins/jobs/accosia3/workspace

+ curl https://github.com/jetbrains-infra/packer-builder-vsphere/releases/download/v1.5/packer-builder-vsphere.linux

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 618 0 618 0 0 535 0 --:--:-- 0:00:01 --:--:-- 535

+ chmod +x /var/lib/jenkins/jobs/accosia3/workspace/packer-builder-vsphere.linux

+ ls -l

total 52

-rw-r--r-- 1 default root 499 Mar 13 10:08 notes.txt

-rw-r--r-- 1 default root 1187 Mar 13 10:08 packer2.json

-rw-r--r-- 1 default root 2220 Mar 13 10:08 packer3.json

-rw-r--r-- 1 default root 158 Mar 13 10:08 packer4.json

-rwxr-xr-x 1 default root 618 Mar 13 10:17 packer-builder-vsphere.linux

-rw-r--r-- 1 default root 730 Mar 13 10:08 packer.json

-rw-r--r-- 1 default root 101 Mar 13 10:08 playbook.yml

-rw-r--r-- 1 default root 430 Mar 13 10:08 README.md

-rw-r--r-- 1 default root 1692 Mar 13 10:08 RHEL-6-8.1.json

-rw-r--r-- 1 default root 1528 Mar 13 10:08 RHEL-6-8.json

drwxr-xr-x 2 default root 4096 Mar 13 10:08 scripts

-rw-r--r-- 1 default root 271 Mar 13 10:08 test.json

-rw-r--r-- 1 default root 1283 Mar 13 10:08 vsphere.json

`
However when Packer build runs I get this error:

`[workspace] $ /var/lib/jenkins/tools/biz.neustar.jenkins.plugins.packer.PackerInstallation/packer/packer build /var/lib/jenkins/jobs/accosia3/workspace/vsphere.json

Failed to initialize build 'vsphere': error initializing builder 'vsphere': fork/exec /var/lib/jenkins/jobs/accosia3/workspace/packer-builder-vsphere.linux: exec format error`

I have tested the packer plug-in locally and it works fine

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Packer build using vsphere.json after the Execute shell download and permission commands. Inspect the downloaded packer-builder-vsphere.linux artifact and the Jenkins/Packer execution environment; done means the vsphere builder initializes successfully instead of reporting an exec format error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system, ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.