-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
84 lines (70 loc) · 3.14 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
tasks.register('buildWebsite') {
doLast {
exec {
println '\n ### Build Started ### \n'
println '\n [1/10] Pulling changes from Github \n'
commandLine 'git', 'pull', 'origin', '1.6.1'
}
exec {
println '\n [2/10] Copying root documentation markdown files \n'
commandLine 'cp', '-r', 'src/site/markdown/.', '/home/jenkins/jenkins-agent/pamela-docusaurus/docs/'
}
exec {
println '\n [3/10] Copying pamela-core documentation markdown files \n'
commandLine 'cp', '-r', 'pamela-core/src/site/markdown/.', '/home/jenkins/jenkins-agent/pamela-docusaurus/docs/pamela-core/'
}
exec {
println '\n [4/10] Copying pamela-security-patterns documentation markdown files \n'
commandLine 'cp', '-r', 'pamela-security-patterns/src/site/markdown/.', '/home/jenkins/jenkins-agent/pamela-docusaurus/docs/pamela-security-patterns/'
}
exec {
ignoreExitValue true
println '\n [5/10] Building pamela-core javadoc \n'
commandLine 'javadoc', '-d', 'javadoc/pamela-core', '-sourcepath', 'pamela-core/src/main/java', '-subpackages', 'org', '-doctitle', 'Pamela-core 1.6.1-SNAPSHOT API', '--ignore-source-errors'
}
exec {
ignoreExitValue true
println '\n [6/10] Building pamela-security-patterns javadoc \n'
commandLine 'javadoc', '-d', 'javadoc/pamela-security-patterns', '-sourcepath', 'pamela-security-patterns/src/main/java', '-subpackages', 'org', '-doctitle', 'Pamela-Security-Patterns 1.6.1-SNAPSHOT API', '--ignore-source-errors'
}
exec {
println '\n [7/10] Building static files \n'
workingDir '/home/jenkins/jenkins-agent/pamela-docusaurus/'
commandLine 'npm', 'run', 'build'
}
exec {
println '\n [8/10] Renamimg build folder \n'
workingDir '/home/jenkins/jenkins-agent/pamela-docusaurus/'
commandLine 'mv', 'build', 'pamela'
}
exec {
println '\n [9/10] Copying static files via ssh \n'
workingDir '/home/jenkins/jenkins-agent/pamela-docusaurus/'
commandLine 'scp', '-r', 'pamela', '[email protected]:/home/www/sites/docusaurus/'
}
exec {
println '\n [10/10] Copying javadoc files via ssh \n'
commandLine 'scp', '-r', './javadoc', '[email protected]:/home/www/sites/docusaurus/pamela/javadoc/'
}
exec {
workingDir '/home/jenkins/jenkins-agent/pamela-docusaurus/'
commandLine 'rm', '-rf', 'pamela'
}
}
}
buildscript {
repositories {
maven { url uri('https://maven.openflexo.org/artifactory/openflexo-deps/') }
}
dependencies {
classpath group: 'org.openflexo', name: 'buildplugin', version: '0.3'
classpath group: 'org.openflexo', name: 'buildconfig', version: '2.99'
}
}
subprojects {
repositories {
maven { url "https://maven.openflexo.org/artifactory/openflexo-deps/" }
}
}
version = "1.6.1"
apply plugin: 'org.openflexo.buildconfig'