Skip to content
Browse files

JENKINS-13897 EC2 Userdata not being Base64 encoded

  • Loading branch information...
1 parent a60b548 commit 4f7987077108576985c9dd5a33a3726abd54668b @ericsmalling ericsmalling committed May 24, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/hudson/plugins/ec2/SlaveTemplate.java
View
3 src/main/java/hudson/plugins/ec2/SlaveTemplate.java
@@ -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;
@@ -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);

0 comments on commit 4f79870

Please sign in to comment.
Something went wrong with that request. Please try again.