-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from rundeck/rundeck-cli-44
Add SCM commands
- Loading branch information
Showing
17 changed files
with
716 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/org/rundeck/client/api/model/ScmActionInputsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ScmActionInputsResult { | ||
public String title; | ||
public String description; | ||
public String integration; | ||
public String actionId; | ||
public List<ScmInputField> fields; | ||
public List<ScmImportItem> importItems; | ||
public List<ScmExportItem> exportItems; | ||
} |
53 changes: 53 additions & 0 deletions
53
src/main/java/org/rundeck/client/api/model/ScmActionPerform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/14/16 | ||
*/ | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ScmActionPerform { | ||
private Map<String, String> input; | ||
private List<String> jobs; | ||
private List<String> items; | ||
private List<String> deleted; | ||
|
||
public Map<String, String> getInput() { | ||
return input; | ||
} | ||
|
||
public void setInput(Map<String, String> input) { | ||
this.input = input; | ||
} | ||
|
||
public List<String> getJobs() { | ||
return jobs; | ||
} | ||
|
||
public void setJobs(List<String> jobs) { | ||
this.jobs = jobs; | ||
} | ||
|
||
public List<String> getItems() { | ||
return items; | ||
} | ||
|
||
public void setItems(List<String> items) { | ||
this.items = items; | ||
} | ||
|
||
public List<String> getDeleted() { | ||
return deleted; | ||
} | ||
|
||
public void setDeleted(List<String> deleted) { | ||
this.deleted = deleted; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/org/rundeck/client/api/model/ScmExportItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ScmExportItem { | ||
public String itemId; | ||
public String originalId; | ||
public ScmJobItem job; | ||
public Boolean renamed; | ||
public Boolean deleted; | ||
|
||
public Map toMap() { | ||
HashMap<String, Object> map = new HashMap<>(); | ||
map.put("itemId", itemId); | ||
if (null != originalId) { | ||
map.put("originalId", originalId); | ||
} | ||
if (null != job) { | ||
map.put("job", job.toMap()); | ||
} | ||
map.put("renamed", renamed); | ||
map.put("deleted", deleted); | ||
return map; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/org/rundeck/client/api/model/ScmImportItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ScmImportItem { | ||
public String itemId; | ||
public Boolean tracked; | ||
public ScmJobItem job; | ||
|
||
public Map toMap() { | ||
HashMap<String, Object> map = new HashMap<>(); | ||
map.put("itemId", itemId); | ||
map.put("tracked", tracked); | ||
map.put("job", job.toMap()); | ||
return map; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/org/rundeck/client/api/model/ScmInputField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
public class ScmInputField { | ||
public String defaultValue; | ||
public String description; | ||
public String name; | ||
public Boolean required; | ||
public Map<String, String> renderingOptions; | ||
public String scope; | ||
public String title; | ||
public String type; | ||
public List<String> values; | ||
|
||
public Map toMap() { | ||
HashMap<String, Object> map = new HashMap<>(); | ||
map.put("name", name); | ||
map.put("title", title); | ||
map.put("description", description); | ||
map.put("defaultValue", defaultValue); | ||
map.put("required", required); | ||
map.put("scope", scope); | ||
map.put("renderingOptions", renderingOptions); | ||
map.put("values", values); | ||
return map; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/org/rundeck/client/api/model/ScmJobItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import org.simpleframework.xml.Element; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
public class ScmJobItem { | ||
public String jobId; | ||
public String jobName; | ||
public String groupPath; | ||
|
||
public Map<String, Object> toMap() { | ||
HashMap<String, Object> map = new HashMap<>(); | ||
map.put("jobId", jobId); | ||
map.put("jobName", jobName); | ||
map.put("groupPath", groupPath); | ||
return map; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
public class ScmPlugin { | ||
public String type; | ||
public String title; | ||
public String description; | ||
public Boolean configured; | ||
public Boolean enabled; | ||
|
||
public Map toMap() { | ||
HashMap<String, Object> map = new HashMap<>(); | ||
map.put("type", type); | ||
map.put("title", title); | ||
map.put("description", description); | ||
map.put("configured", configured); | ||
map.put("enabled", enabled); | ||
return map; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/org/rundeck/client/api/model/ScmPluginsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.rundeck.client.api.model; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author greg | ||
* @since 12/13/16 | ||
*/ | ||
public class ScmPluginsResult { | ||
public String integration; | ||
public List<ScmPlugin> plugins; | ||
} |
Oops, something went wrong.