-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (91 loc) · 2.86 KB
/
build.gradle
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
plugins {
id 'com.palantir.docker' version '0.25.0' apply false
id 'java'
id "org.owasp.dependencycheck" version "8.1.2"
}
subprojects {
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'com.palantir.docker'
ext {
sharedDir = file("${project.rootDir}/shared")
baseSailfishVersion = '3.3'
sailfishVersion = "${baseSailfishVersion}.202"
pluginMainDir = file('src/main/plugin')
pluginGenDir = file('src/gen/plugin')
versionFile = file("${pluginGenDir}/VERSION")
dockerSailfishWorkspaceDir = 'sailfish/workspace/plugins/th2_service'
dockerSailfishWorkspaceLibDir = "${dockerSailfishWorkspaceDir}/libs"
}
repositories {
maven {
name 'MavenLocal'
url sharedDir
}
mavenCentral()
maven {
name 'Sonatype_snapshots'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'Sonatype_releases'
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
}
mavenLocal()
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
}
configurations {
service
}
dependencies {
service ("com.exactpro.sf:${sf_service_name}:${sailfishVersion}") {
exclude module: 'sailfish-core'
exclude module: 'sailfish-common'
}
}
task pluginWriteVersion {
outputs.file versionFile
doLast{
versionFile.write "lightweight: true\n" +
"plugin_alias: th2_service\n" +
"name: th2_service\n" +
"build_number: 0\n" +
"revision: 0\n" +
"git_hash: 0\n" +
"branch: fake\n" +
"version: ${baseSailfishVersion}.0.0\n" +
"core_version: ${baseSailfishVersion}.0"
}
}
dockerPrepare {
dependsOn pluginWriteVersion
}
docker {
copySpec.with {
from(configurations.service) {
into dockerSailfishWorkspaceLibDir
}
from(pluginMainDir) {
into dockerSailfishWorkspaceDir
}
from(pluginGenDir) {
into dockerSailfishWorkspaceDir
}
}
}
clean {
delete(pluginGenDir)
}
}
dependencyCheck {
formats=['SARIF', 'JSON', 'HTML']
failBuildOnCVSS=5
analyzers {
assemblyEnabled = false
nugetconfEnabled = false
nodeEnabled = false
}
}