-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathJenkinsfile
32 lines (30 loc) · 1.1 KB
/
Jenkinsfile
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
node {
def lib = library (
identifier: 'simple-lib@temp',
retriever:
modernSCM([
$class: 'GitSCMSource',
credentialsId: '92bb99b8-238f-4f06-8386-b45861c9dd76',
id: '42de5809-9017-4717-90f7-1e55cd53e5f7',
remote: 'git@github.com:aleksei-bulgak/jenkins-shared-library-example.git',
traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]
])
)
stage("Checkout class"){
lib.by.bulgak.jenkins.lib.Checkout.new().checkout(
"git@github.com:aleksei-bulgak/jenkins-shared-library-example.git",
"master"
);
}
stage("Maven builder"){
def mavenLib = lib.by.bulgak.jenkins.lib
def mvn = mavenLib.Maven.builder(this)
.action("clean install")
.argument(mavenLib.MavenArgument.create().withPrefix("-D").withKey("key").withName("value").build())
.argument(mavenLib.MavenArgument.create().withPrefix("-D").withKey("key2").withName("value2").build())
.silent(true)
.build();
def constants = mavenLib.Constants.new()
mvn.execute(constants.MAVEN);
}
}