Commits

Anonymous committed 8d926c0

Bamboo support

Comments (0)

Files changed (3)

src/main/java/com/atlassian/bamboo/plugins/confdeploy/BambooDeployTask.java

+package com.atlassian.bamboo.plugins.confdeploy;
+
+public class BambooDeployTask extends AutoDeployTask
+{
+    @Override
+    public Product getTargetProduct()
+    {
+        return Product.BAMBOO;
+    }
+}

src/main/java/com/atlassian/bamboo/plugins/confdeploy/Product.java

 {
     public static final Product CONFLUENCE = new Product("doauthenticate.action?os_authType=basic", "password");
     public static final Product JIRA = new Product("secure/admin/WebSudoAuthenticate.jspa?os_authType=basic", "webSudoPassword");
+    public static final Product BAMBOO = new Product("userlogin.action?os_authType=basic", "os_password")
+    {
+        @Override
+        protected List<BasicNameValuePair> getAuthenticationParams(String username, String password)
+        {
+            List<BasicNameValuePair> values = super.getAuthenticationParams(username, password);
+            values.add(new BasicNameValuePair("os_username", username));
+            return values;
+        };
+
+        public boolean hasWebSudo()
+        {
+            return false;
+        };
+    };
 
     private static final String ENCODING = "utf-8";
 

src/main/resources/atlassian-plugin.xml

         <resource type="freemarker" name="view" location="viewTask.ftl"/>
     </taskType>
 
+    <taskType name="Deploy Bamboo Plugin" class="com.atlassian.bamboo.plugins.confdeploy.BambooDeployTask" key="bamboodeploy">
+        <description>Automatically deploys an Atlassian plugin artifact to a Bamboo Server.</description>
+        <category name="deployment"/>
+        <configuration class="com.atlassian.bamboo.plugins.confdeploy.AutoDeployConfigurator"/>
+        <resource type="freemarker" name="edit" location="editTask.ftl"/>
+        <resource type="freemarker" name="view" location="viewTask.ftl"/>
+    </taskType>
+
 </atlassian-plugin>