Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #19 from ericNdfw/master
JENKINS-13897 EC2 Userdata not being Base64 encoded
  • Loading branch information
francisu committed May 25, 2012
2 parents a60b548 + 4f79870 commit 35b201e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/plugins/ec2/SlaveTemplate.java
Expand Up @@ -24,6 +24,7 @@

import javax.servlet.ServletException;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
Expand Down Expand Up @@ -174,7 +175,7 @@ public EC2Slave provision(TaskListener listener) throws AmazonClientException, I
Placement placement = new Placement(getZone());
request.setPlacement(placement);
}
request.setUserData(userData);
request.setUserData(Base64.encodeBase64String(userData.getBytes()));
request.setKeyName(keyPair.getKeyName());
request.setInstanceType(type.toString());
request.setSecurityGroups(securityGroupSet);
Expand Down

0 comments on commit 35b201e

Please sign in to comment.