Skip to content

Commit e41c60d

Browse files
authored
Merge pull request #78 from ketan/upgrade-libs
Upgrade a bunch of libraries
2 parents 5c38250 + 921c860 commit e41c60d

6 files changed

Lines changed: 73 additions & 61 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
## 3.0.3 - 2018-10-12
2+
3+
- Upgraded some dependant libraries to improve compatibility with newer docker versions.
4+
15
## 3.0.2 - 2018-09-04
6+
27
- Removed additional margin from status report pages
38

49
## 3.0.1 - 2018-04-17

INSTALL.md

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Table of Contents
1717

1818
## Installation
1919

20-
* Copy the file `build/libs/docker-swarm-elastic-agents-VERSION.jar` to the GoCD server under `${GO_SERVER_DIR}/plugins/external`
21-
and restart the server.
20+
* Copy the file `build/libs/docker-swarm-elastic-agents-VERSION.jar` to the GoCD server under `${GO_SERVER_DIR}/plugins/external`
21+
and restart the server.
2222
* The `GO_SERVER_DIR` is usually `/var/lib/go-server` on **Linux** and `C:\Program Files\Go Server` on **Windows**.
2323

2424
## Configuration
@@ -27,62 +27,69 @@ and restart the server.
2727

2828
The plugin settings are used to provide global level configurations for the plugin. Configurations such as docker swarm cluster configuration and private registry settings are provided in plugin settings.
2929

30-
1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Plugins_**<br/>
31-
![Plugins][1]
32-
33-
2. Click on **_Settings icon_** of `GoCD Elastic agent plugin for Docker Swarm` to update plugin settings configuration.<br/>
34-
![Configure plugin settings][2]
35-
36-
| Field Name | Mandatory | Description |
37-
|---------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
38-
| **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` |
39-
| **Environment variables** | No | The environment variable for docker container |
40-
| **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 |
41-
| **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 |
42-
| **Docker URI** | Yes | Docker swarm cluster uri. <br/>If your Go Server is running on local machine then use(for mac and linux) — `unix:///var/run/docker.sock` |
43-
| **Docker CA Certificate** | No | Docker swarm cluster CA certificate |
44-
| **Docker Client Key** | No | Docker swarm cluster client key |
45-
| **Docker Client Certificate** | No | Docker swarm cluster client certificate |
46-
| **Private Docker Registry** | Yes | Optionally specify the private docker registry settings |
47-
30+
1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Plugins_**
31+
32+
![Plugins][1]
33+
34+
2. Click on **_Settings icon_** of `GoCD Elastic agent plugin for Docker Swarm` to update plugin settings configuration.
35+
36+
![Configure plugin settings][2]
37+
38+
| Field Name | Mandatory | Description |
39+
|---------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
40+
| **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+
| **Environment variables** | No | The environment variable for docker container |
42+
| **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 |
43+
| **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 |
44+
| **Docker URI** | Yes | Docker swarm cluster uri. <br/>If your Go Server is running on local machine then use(for mac and linux) — `unix:///var/run/docker.sock` |
45+
| **Docker CA Certificate** | No | Docker swarm cluster CA certificate |
46+
| **Docker Client Key** | No | Docker swarm cluster client key |
47+
| **Docker Client Certificate** | No | Docker swarm cluster client certificate |
48+
| **Private Docker Registry** | Yes | Optionally specify the private docker registry settings |
49+
4850
### Create an elastic profile
4951

5052
The Elastic Agent Profile is used to define the configuration of a docker container(GoCD docker agent). The profile is used to configure the docker image, set memory limits, provide docker command and environment variables etc...
5153

52-
1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Elastic Agent Profiles_**<br/>
53-
![Elastic Profiles][3]
54-
55-
2. Click on **_Add_** to create new elastic agent profile<br/>
56-
![Create elastic profile][4]
57-
58-
| Field Name | Mandatory | Description |
59-
|---------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
60-
| **Id** | Yes | Unique id for current profile |
61-
| **Plugin id** | Yes | Select `GoCD Docker Swarm Elastic Agents` for **_Plugin id_** |
62-
| **Docker image** | Yes | GoCD elastic agent docker image name. Pre build GoCD agent docker images are available [here](https://www.gocd.org/download/#docker) |
63-
| **Memory soft limit** | Yes | Soft memory limit. Container will start with memory specified here |
64-
| **Maximum hard limit** | Yes | Hard memory limit for container |
65-
| **Docker Command** | No | Commands that you want to execute on container start. <br/>*_Note: This will override the existing docker entry-point defined in docker image._* |
66-
| **Environment Variables** | No | Environment variables for container. This will overrides the environment variables defined in plugin settings.(enter each per line) |
67-
| **Secrets** | No | Allows users bind a docker secret with container(enter each per line) |
68-
| **Network attachments** | No | Allows user to attach docker networks to container(enter each per line) |
69-
| **Volume Mounts** | No | Allows user to mount/bind volume to docker container(enter each per line) |
70-
| **Host entries** | No | This allows users to add host entries in `/etc/hosts`(enter each per line) |
71-
| **Constraints** | No | You can limit the set of nodes where a task can be scheduled by defining constraint expressions.<br/>Multiple constraints find nodes that satisfy every expression (AND match, enter each per line) |
54+
1. Login to `GoCD server` as admin and navigate to **_Admin_** _>_ **_Elastic Agent Profiles_**
55+
56+
![Elastic Profiles][3]
57+
58+
2. Click on **_Add_** to create new elastic agent profile
59+
60+
![Create elastic profile][4]
61+
62+
| Field Name | Mandatory | Description |
63+
|---------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
64+
| **Id** | Yes | Unique id for current profile |
65+
| **Plugin id** | Yes | Select `GoCD Docker Swarm Elastic Agents` for **_Plugin id_** |
66+
| **Docker image** | Yes | GoCD elastic agent docker image name. Pre build GoCD agent docker images are available [here](https://www.gocd.org/download/#docker) |
67+
| **Memory soft limit** | Yes | Soft memory limit. Container will start with memory specified here |
68+
| **Maximum hard limit** | Yes | Hard memory limit for container |
69+
| **Docker Command** | No | Commands that you want to execute on container start. <br/>*_Note: This will override the existing docker entry-point defined in docker image._* |
70+
| **Environment Variables** | No | Environment variables for container. This will overrides the environment variables defined in plugin settings.(enter each per line) |
71+
| **Secrets** | No | Allows users bind a docker secret with container(enter each per line) |
72+
| **Network attachments** | No | Allows user to attach docker networks to container(enter each per line) |
73+
| **Volume Mounts** | No | Allows user to mount/bind volume to docker container(enter each per line) |
74+
| **Host entries** | No | This allows users to add host entries in `/etc/hosts`(enter each per line) |
75+
| **Constraints** | No | You can limit the set of nodes where a task can be scheduled by defining constraint expressions.<br/>Multiple constraints find nodes that satisfy every expression (AND match, enter each per line) |
7276

7377

7478
### Configure job to use an elastic agent profile
7579

76-
1. Click the gear icon on **_Pipeline_**<br/>
77-
![Pipeline][5]
80+
1. Click the gear icon on **_Pipeline_**
7881

79-
2. Click on **_Quick Edit_** button<br/>
80-
![Quick edit][6]
82+
![Pipeline][5]
83+
84+
2. Click on **_Quick Edit_** button
85+
86+
![Quick edit][6]
8187

8288
3. Click on **_Stages_**
8389
4. Create/Edit a job
84-
5. Enter the `unique id` of an elastic profile in Job Settings<br/>
85-
![Configure a job][7]
90+
5. Enter the `unique id` of an elastic profile in Job Settings
91+
92+
![Configure a job][7]
8693

8794
6. Save your changes
8895

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Table of Contents
99
* [Using your own docker image with elastic agents](#using-your-own-docker-image-with-elastic-agents)
1010
* [Troubleshooting](#troubleshooting)
1111
* [License](#license)
12-
12+
1313
## Installation
1414

15-
Documentation for installation is available [here](INSTALL.md)
15+
Documentation for installation is available [here](INSTALL.md).
1616

1717
## Building the code base
1818

build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
*/
1616

1717
plugins {
18-
id 'com.github.ben-manes.versions' version '0.14.0'
18+
id 'com.github.ben-manes.versions' version '0.20.0'
1919
id 'co.riiid.gradle' version '0.4.2'
2020
}
2121

2222
apply plugin: 'java'
2323
apply from: 'plugin-common.gradle'
2424

25-
project.ext.pluginVersion = '3.0.2'
25+
project.ext.pluginVersion = '3.0.3'
2626
project.ext.fullVersion = project.distVersion ? "${project.pluginVersion}-${project.distVersion}" : project.pluginVersion
2727

2828
group = 'cd.go.contrib'
@@ -59,18 +59,18 @@ sourceSets {
5959
}
6060

6161
dependencies {
62-
compileOnly group: 'cd.go.plugin', name: 'go-plugin-api', version: '18.2.0'
63-
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
64-
compile group: 'com.spotify', name: 'docker-client', version: '8.10.1'
65-
compile group: 'joda-time', name: 'joda-time', version: '2.9.9'
66-
compile group: 'commons-io', name: 'commons-io', version: '2.5'
67-
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.23'
62+
compileOnly group: 'cd.go.plugin', name: 'go-plugin-api', version: '18.9.0'
63+
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
64+
compile group: 'com.spotify', name: 'docker-client', version: '8.14.1'
65+
compile group: 'joda-time', name: 'joda-time', version: '2.10'
66+
compile group: 'commons-io', name: 'commons-io', version: '2.6'
67+
compile group: 'org.freemarker', name: 'freemarker', version: '2.3.28'
6868

6969
testCompile group: 'junit', name: 'junit', version: '4.12'
7070
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
71-
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.9.0'
71+
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
7272
testCompile group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.0'
73-
testCompile group: 'org.jsoup', name: 'jsoup', version: '1.10.2'
73+
testCompile group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
7474
}
7575

7676
processResources {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/cd/go/contrib/elasticagents/dockerswarm/elasticagent/model/reports/agent/TaskStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class TaskStatus {
2525
private final String state;
2626
private final String message;
2727
private String containerId;
28-
private Integer exitCode;
28+
private Long exitCode;
2929
private String pid;
3030

3131
public TaskStatus(Task task) {
@@ -67,7 +67,7 @@ public String getContainerId() {
6767
return containerId;
6868
}
6969

70-
public Integer getExitCode() {
70+
public Long getExitCode() {
7171
return exitCode;
7272
}
7373

0 commit comments

Comments
 (0)