forked from docToolchain/docToolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.groovy
108 lines (81 loc) · 4.64 KB
/
Config.groovy
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
outputPath = 'build/docs'
// Path where the docToolchain will search for the input files.
// This path is appended to the docDir property specified in gradle.properties
// or in the command line, and therefore must be relative to it.
//inputPath = 'src/docs' => moved to gradle.properties!
inputFiles = [
[file: 'manual.adoc', formats: ['html','pdf']],
]
taskInputsDirs = ["${inputPath}/images"]
taskInputsFiles = []
//*****************************************************************************************
//Configuration for exportChangelog
exportChangelog = [:]
changelog.with {
// Directory of which the exportChangelog task will export the changelog.
// It should be relative to the docDir directory provided in the
// gradle.properties file.
dir = 'src/docs'
// Command used to fetch the list of changes.
// It should be a single command taking a directory as a parameter.
// You cannot use multiple commands with pipe between.
// This command will be executed in the directory specified by changelogDir
// it the environment inherited from the parent process.
// This command should produce asciidoc text directly. The exportChangelog
// task does not do any post-processing
// of the output of that command.
//
// See also https://git-scm.com/docs/pretty-formats
cmd = 'git log --pretty=format:%x7c%x20%ad%x20%n%x7c%x20%an%x20%n%x7c%x20%s%x20%n --date=short'
}
//*****************************************************************************************
//tag::confluenceConfig[]
//Configureation for publishToConfluence
confluence = [:]
// 'input' is an array of files to upload to Confluence with the ability
// to configure a different parent page for each file.
//
// Attributes
// - 'file': absolute or relative path to the asciidoc generated html file to be exported
// - 'url': absolute URL to an asciidoc generated html file to be exported
// - 'ancestorId' (optional): the id of the parent page in Confluence; leave this empty
// if a new parent shall be created in the space
// - 'preambleTitle' (optional): the title of the page containing the preamble (everything
// before the first second level heading). Default is 'arc42'
//
// The following four keys can also be used in the global section below
// - 'spaceKey' (optional): page specific variable for the key of the confluence space to write to
// - 'createSubpages' (optional): page specific variable to determine whether ".sect2" sections shall be split from the current page into subpages
// - 'pagePrefix' (optional): page specific variable, the pagePrefix will be a prefix for the page title and it's sub-pages
// use this if you only have access to one confluence space but need to store several
// pages with the same title - a different pagePrefix will make them unique
// - 'pageSuffix' (optional): same usage as prefix but appended to the title and it's subpages
// only 'file' or 'url' is allowed. If both are given, 'url' is ignored
confluence.with {
input = [
[ file: "build/docs/html5/arc42-template-de.html" ],
]
// endpoint of the confluenceAPI (REST) to be used
api = 'https://[yourServer]/[context]/rest/api/'
// Additionally, spaceKey, createSubpages, pagePrefix and pageSuffix can be globally defined here. The assignment in the input array has precedence
// the key of the confluence space to write to
spaceKey = 'asciidoc'
// variable to determine whether ".sect2" sections shall be split from the current page into subpages
createSubpages = false
// the pagePrefix will be a prefix for each page title
// use this if you only have access to one confluence space but need to store several
// pages with the same title - a different pagePrefix will make them unique
pagePrefix = ''
pageSuffix = ''
// username:password of an account which has the right permissions to create and edit
// confluence pages in the given space.
// if you want to store it securely, fetch it from some external storage.
// you might even want to prompt the user for the password like in this example
credentials = "user:pass_or_token".bytes.encodeBase64().toString()
// HTML Content that will be included with every page published
// directly after the TOC. If left empty no additional content will be
// added
// extraPageContent = '<ac:structured-macro ac:name="warning"><ac:parameter ac:name="title" /><ac:rich-text-body>This is a generated page, do not edit!</ac:rich-text-body></ac:structured-macro>
extraPageContent = ''
}
//end::confluenceConfig[]