-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
108 lines (88 loc) · 2.97 KB
/
Copy pathbuild.gradle
File metadata and controls
108 lines (88 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
plugins {
id 'base'
id 'pl.allegro.tech.build.axion-release' version '1.21.4'
}
group = 'org.rundeck.plugins'
scmVersion {
ignoreUncommittedChanges = false
tag {
prefix = '' // NO "v" prefix - see PLUGIN_TAGGING_ARCHITECTURE.md
versionSeparator = ''
}
}
// Plugin metadata
ext {
pluginName = 'AWS S3 Steps'
pluginDescription = "Simple shell wrapper around AWS S3 CLI to expose subcommands as node steps"
sopsCopyright = "© 2025, Rundeck, Inc."
sopsUrl = "http://rundeck.com"
buildDateString = new Date().format("yyyy-MM-dd'T'HH:mm:ssX")
archivesBaseName = "aws-s3-steps"
pluginBaseFolder = "."
}
version = scmVersion.version // Dynamic version from git tag
ext.archiveFilename = "${archivesBaseName}-${version}"
ext.publishName = "AWS S3 Steps ${project.version}"
ext.githubSlug = 'rundeck-plugins/aws-s3-steps'
ext.developers = [
[id: 'gschueler', name: 'Greg Schueler', email: 'greg@rundeck.com']
]
import org.apache.tools.ant.filters.ReplaceTokens
// Set default tasks
defaultTasks('clean', 'build', 'pluginZip')
task pluginZip(type: Jar) {
archiveBaseName = archivesBaseName
archiveVersion = version
archiveClassifier = ''
archiveExtension = 'zip'
destinationDirectory = layout.buildDirectory.dir('libs')
from(layout.buildDirectory.dir('zip-contents')) {
include('*.yaml')
include('resources/**')
include('contents/*')
into("${archivesBaseName}-${version}")
}
manifest {
attributes(
'Rundeck-Plugin-Name': pluginName,
'Rundeck-Plugin-Description': pluginDescription,
'Rundeck-Plugin-Archive': 'true',
'Rundeck-Plugin-File-Version': version,
'Rundeck-Plugin-Author': sopsCopyright,
'Rundeck-Plugin-URL': sopsUrl,
'Rundeck-Plugin-Date': buildDateString
)
}
}
pluginZip.doFirst {
def assetsMap = new Properties()
def tokens = assetsMap + [
version : version,
date : new Date().format("yyyy-MM-dd'T'HH:mm:ssX"),
author : sopsCopyright,
url : sopsUrl,
title : pluginName,
description: pluginDescription,
name : archivesBaseName,
]
copy {
from(file('resources')) {
include('**/*')
into('resources')
}
from(file('contents')) {
into('contents')
}
from('plugin.yaml') {
filter(ReplaceTokens, tokens: tokens)
exclude('**/*.png')
}
into(layout.buildDirectory.dir('zip-contents'))
}
}
apply from: "${rootDir}/gradle/publishing.gradle"
// lifecycle `build` is created by Gradle base plugin (pulled in via nexus / maven-publish); extend it instead of redefining
tasks.named('build').configure { dependsOn(pluginZip) }
task install(dependsOn: ['build', 'publishToMavenLocal']) {
}
tasks.named('clean').configure { delete('build') }