Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

JENKINS-13897 EC2 Userdata not being Base64 encoded

  • Loading branch information...
commit 4f7987077108576985c9dd5a33a3726abd54668b 1 parent a60b548
@ericsmalling ericsmalling authored
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);
Please sign in to comment.
Something went wrong with that request. Please try again.