kenorb-contrib / vagrant-plugin

Vagrant plugin for Jenkins
https://wiki.jenkins-ci.org/display/JENKINS/Vagrant-plugin
Apache License 2.0
0 stars 0 forks source link

Java/Jenkins: "Provider" argument doesn't work when booting up Vagrant VM #1

Open kenorb opened 8 years ago

kenorb commented 8 years ago

Issue: https://issues.jenkins-ci.org/browse/JENKINS-25932

kstuart commented 5 years ago

Set up a test environment for the reported Jenkins version in linked issue (1.592) and the provider argument is being processed successfully? screenshot from 2019-01-03 18-58-13

kenorb commented 5 years ago

I was using variable to pass the VM name, as follow:

screen shot 2016-07-12 at 02 26 47

Here is the Vagrantfile which I was testing with aws. Ideally if you could set aws provider to test (similar as above), where VM_NAME was just job name, e.g. VM_NAME=${JOB_BASE_NAME}-${BUILD_NUMBER} (set in properties content, but you can test with a string).

So you can basically clone EA-Tester repository and invoke its Vagrantfile using Vagrant plugin to boot up the machine in AWS, provision and destroy.

kstuart commented 5 years ago

The issue doesn't appear to be related with processing the Provider setting, Looking at the EA-Tester Vagrantfile the issue is with setting Vagrant VM name to ${VM_NAME}.

As well as setting the environment variable VM_NAME also set PROVIDER=aws to prevent it defaulting to virtualbox, then in the Jenkins job configuration set all Vagrant VM name to MT-${PROVIDER}-${VM_NAME}.

provision.sh line 89 for installing wine staging should include flag --allow-unauthenticated.

That should then work.

kenorb commented 5 years ago

I've checked and issue with Unauthenticated key is caused by the recent change of WineHQ key as per https://wiki.winehq.org/Ubuntu

The WineHQ repository key was changed on 2018-12-19.

This issue wasn't there originally. I've fixed it in dev branch.

Will try to test again and check whether I can reproduce the original issue.

kstuart commented 5 years ago

How is testing going?

I don't see a provider issue when using AWS or Docker when the VM name is set as suggested in my previous post, only seeing issues if the Vagrant VM name is set to ${VM_NAME} as per your screen shot.

Note I'm not able to SSH into the AMI but that's not surprising or related to this issue, the provider argument is being used correctly and an AWS instance for the AMI is successfully created. When testing with the provider argument set to docker then I can of course SSH into the container and the scripts, provisioning and destruction of the container all work as expected.

screenshot from 2019-01-17 20-21-59

screenshot from 2019-01-17 20-21-27