Skip to content

Commit da15272

Browse files
committed
Use the new plugin helper to build and deploy jars
1 parent e2286d9 commit da15272

File tree

8 files changed

+28
-403
lines changed

8 files changed

+28
-403
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ build/
1515
!gradle-wrapper.jar
1616
kubernetes-elastic-agent.iml
1717
out/
18-
18+
src/main/resources-generated/

build.gradle

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,37 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
plugins {
17-
id 'co.riiid.gradle' version '0.4.2'
18-
}
16+
1917

2018
apply plugin: 'java'
21-
apply from: 'plugin-helpers.gradle'
19+
apply from: "https://raw.githubusercontent.com/gocd/gocd-plugin-gradle-task-helpers/master/helper.gradle?_=${(int) (new Date().toInstant().epochSecond / 60)}"
20+
21+
gocdPlugin {
22+
id = 'cd.go.contrib.elasticagent.kubernetes'
23+
pluginVersion = '2.1.0'
24+
goCdVersion = '18.10.0'
25+
name = 'Kubernetes Elastic Agent Plugin'
26+
description = 'Kubernetes Based Elastic Agent Plugins for GoCD'
27+
vendorName = 'ThoughtWorks, Inc.'
28+
vendorUrl = 'https://github.com/gocd/kubernetes-elastic-agents'
29+
30+
githubRepo {
31+
owner = System.getenv('GITHUB_USER') ?: 'bob'
32+
repo = 'kubernetes-elastic-agents'
33+
token = System.getenv('GITHUB_TOKEN') ?: 'bad-token'
34+
}
35+
36+
pluginProject = project
37+
38+
prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE'))
39+
assetsToRelease = [project.tasks.jar]
40+
}
2241

2342
sourceCompatibility = 1.8
2443
targetCompatibility = 1.8
2544

26-
project.ext.pluginVersion = '2.1.0'
27-
project.ext.fullVersion = project.git.distVersion() ? "${project.pluginVersion}-${project.git.distVersion()}" : project.pluginVersion
28-
2945
group = 'cd.go.contrib'
30-
version = project.fullVersion
31-
32-
project.ext.pluginDesc = [
33-
id : 'cd.go.contrib.elasticagent.kubernetes',
34-
repo : 'kubernetes-elastic-agents',
35-
version : project.version,
36-
goCdVersion: '18.10.0',
37-
name : 'Kubernetes Elastic Agent Plugin',
38-
description: 'Kubernetes Based Elastic Agent Plugins for GoCD',
39-
vendorName : 'GoCD Contributors',
40-
vendorUrl : 'https://github.com/gocd/kubernetes-elastic-agents'
41-
]
46+
version = gocdPlugin.fullVersion(project)
4247

4348
repositories {
4449
jcenter()
@@ -80,5 +85,3 @@ jar {
8085
// into "/"
8186
// }
8287
}
83-
84-
apply from: 'plugin-tasks.gradle'

plugin-helpers.gradle

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

0 commit comments

Comments
 (0)