-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
44 lines (44 loc) · 1.54 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
33
34
35
36
37
38
39
40
41
42
43
44
pipeline {
agent any
triggers {
gerrit customUrl: '',
gerritProjects: [
[branches: [[compareType: 'PLAIN', pattern: 'master']],
compareType: 'PLAIN',
disableStrictForbiddenFileVerification: false,
pattern: 'dhtnet']],
triggerOnEvents: [
commentAddedContains('!build'),
patchsetCreated(excludeDrafts: true, excludeNoCodeChange: true)]
}
options {
ansiColor('xterm')
}
parameters {
string(name: 'GERRIT_REFSPEC',
defaultValue: 'refs/heads/dhtnet',
description: 'The Gerrit refspec to fetch.')
}
stages {
stage('SCM Checkout') {
steps {
checkout changelog: true, poll: false,
scm: [$class: 'GitSCM',
branches: [[name: 'FETCH_HEAD']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'CloneOption', noTags: true, reference: '', shallow: true],
[$class: 'WipeWorkspace']],
submoduleCfg: [],
userRemoteConfigs: [[refspec: '${GERRIT_REFSPEC}', url: 'https://${JAMI_GERRIT_URL}/dhtnet']]]
}
}
stage('Build') {
steps {
script {
docker.build("dhtnet:${env.BUILD_ID}", "--target build .")
}
}
}
}
}