-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-apache-httpd-trunk-v3
40 lines (33 loc) · 1.4 KB
/
build-apache-httpd-trunk-v3
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
// changes from v2: using one node to fetch the sources and a different node to build. Quite useful for embedded scenarios or variant testing.
def sourcesStashName = "apache-httpd-sources"
stage "Fetch Sources"
node('jdk8') { // this really could be any node with a connection to the outside world
fetchSources()
stash sourcesStashName
}
node('apache') { // this node doesn't need an outside connection
stage "Build Configuration"
unstash sourcesStashName // retrieving the stuff we fetched earlier
configureBuild()
stage "Make"
make()
}
// POST: we have a local build ready to run tests or to be included in a container setup
// fetching sources takes about 50 seconds
def fetchSources () {
svn 'http://svn.apache.org/repos/asf/httpd/httpd/trunk'
// option: fetch both source trees separately and use source stashes
svn 'http://svn.apache.org/repos/asf/apr/apr/trunk'
// option: use source stashes to more easily distribute the build for various configurations
}
// buildconf just takes 1 second, so we put that in the same stage as configure (which takes around 20 seconds)
def configureBuild () {
sh "./buildconf"
sh "mkdir -p " + pwd() + "/apache-trunk"
// use a directory specific to the build, so we don't get into trouble with parallel builds
sh "./configure --prefix=" + pwd() + "/apache-trunk --with-included-apr"
}
// make takes roughly 40 seconds
def make () {
sh "make"
}