Skip to content

Commit 705a260

Browse files
committed
Remove usage and validation of port 8154.
1 parent 9608e7f commit 705a260

22 files changed

+25
-207
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The cluster profile settings are used to provide cluster level configurations fo
3838

3939
| Field Name | Mandatory | Description |
4040
|---------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
41-
| **Go server url** | Yes | GoCD server url(`https://YOUR_HOST_OR_IP_ADDRESS:8154/go`). The docker elastic agent will use this URL to register itself with GoCD. <br/>The GoCD hostname or ip must resolve in your container. Don't use `localhost` or `127.0.0.1` |
41+
| **Go server url** | Yes | GoCD server url(`http://YOUR_HOST_OR_IP_ADDRESS:8153/go`). The docker elastic agent will use this URL to register itself with GoCD. <br/>The GoCD hostname or ip must resolve in your container. Don't use `localhost` or `127.0.0.1` |
4242
| **Environment variables** | No | The environment variable for docker container |
4343
| **Agent auto-register timeout** | Yes | Agent auto-register timeout(in minutes). Plugin will kill the agent container if it fails to register within provided time limits |
4444
| **Maximum docker containers** | Yes | Maximum docker containers to run at any given point in time. Plugin will not create more container when running container count reached to specified limits |

src/main/java/cd/go/contrib/elasticagents/docker/executors/ClusterProfileValidateRequestExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ClusterProfileValidateRequestExecutor(ClusterProfileValidateRequest reque
3636
}
3737

3838
@Override
39-
public GoPluginApiResponse execute() throws Exception {
39+
public GoPluginApiResponse execute() {
4040
ArrayList<Map<String, String>> result = new ArrayList<>();
4141

4242
List<String> knownFields = new ArrayList<>();

src/main/java/cd/go/contrib/elasticagents/docker/executors/CreateAgentRequestExecutor.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@
2121
import com.thoughtworks.go.plugin.api.response.DefaultGoPluginApiResponse;
2222
import com.thoughtworks.go.plugin.api.response.GoPluginApiResponse;
2323
import org.joda.time.DateTime;
24-
import org.joda.time.LocalDate;
2524
import org.joda.time.LocalTime;
2625
import org.joda.time.format.DateTimeFormat;
2726
import org.joda.time.format.DateTimeFormatter;
28-
import org.joda.time.format.DateTimeFormatterBuilder;
29-
30-
import java.util.Date;
3127

3228
public class CreateAgentRequestExecutor implements RequestExecutor {
3329
private static final DateTimeFormatter MESSAGE_PREFIX_FORMATTER = DateTimeFormat.forPattern("'##|'HH:mm:ss.SSS '[go]'");

src/main/java/cd/go/contrib/elasticagents/docker/executors/Field.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818

1919
import com.google.gson.annotations.Expose;
2020
import com.google.gson.annotations.SerializedName;
21-
import org.apache.commons.lang.StringUtils;
2221

23-
import java.util.HashMap;
24-
import java.util.Map;
2522
import java.util.concurrent.atomic.AtomicInteger;
2623

2724
public class Field {

src/main/java/cd/go/contrib/elasticagents/docker/executors/GetClusterProfileMetadataExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class GetClusterProfileMetadataExecutor implements RequestExecutor {
6464

6565
@Override
6666

67-
public GoPluginApiResponse execute() throws Exception {
67+
public GoPluginApiResponse execute() {
6868
return new DefaultGoPluginApiResponse(200, GSON.toJson(FIELDS));
6969
}
7070
}

src/main/java/cd/go/contrib/elasticagents/docker/executors/GetClusterProfileViewRequestExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class GetClusterProfileViewRequestExecutor implements RequestExecutor {
2727
private static final Gson GSON = new Gson();
2828

2929
@Override
30-
public GoPluginApiResponse execute() throws Exception {
30+
public GoPluginApiResponse execute() {
3131
JsonObject jsonObject = new JsonObject();
3232
jsonObject.addProperty("template", Util.readResource("/plugin-settings.template.html"));
3333
DefaultGoPluginApiResponse defaultGoPluginApiResponse = new DefaultGoPluginApiResponse(200, GSON.toJson(jsonObject));

src/main/java/cd/go/contrib/elasticagents/docker/executors/GetPluginSettingsIconExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class GetPluginSettingsIconExecutor implements RequestExecutor {
2828
private static final Gson GSON = new Gson();
2929

3030
@Override
31-
public GoPluginApiResponse execute() throws Exception {
31+
public GoPluginApiResponse execute() {
3232
JsonObject jsonObject = new JsonObject();
3333
jsonObject.addProperty("content_type", "image/svg+xml");
3434
jsonObject.addProperty("data", Base64.encodeBase64String(Util.readResourceBytes("/docker-plain.svg")));

src/main/java/cd/go/contrib/elasticagents/docker/executors/GetProfileMetadataExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class GetProfileMetadataExecutor implements RequestExecutor {
5555

5656
@Override
5757

58-
public GoPluginApiResponse execute() throws Exception {
58+
public GoPluginApiResponse execute() {
5959
return new DefaultGoPluginApiResponse(200, GSON.toJson(FIELDS));
6060
}
6161
}

src/main/java/cd/go/contrib/elasticagents/docker/executors/GetProfileViewExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class GetProfileViewExecutor implements RequestExecutor {
2727
private static final Gson GSON = new Gson();
2828

2929
@Override
30-
public GoPluginApiResponse execute() throws Exception {
30+
public GoPluginApiResponse execute() {
3131
JsonObject jsonObject = new JsonObject();
3232
jsonObject.addProperty("template", Util.readResource("/profile.template.html"));
3333
DefaultGoPluginApiResponse defaultGoPluginApiResponse = new DefaultGoPluginApiResponse(200, GSON.toJson(jsonObject));

src/main/java/cd/go/contrib/elasticagents/docker/executors/GoServerURLField.java

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)