forked from Tradeshift/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
37 lines (33 loc) · 1.23 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
// This Jenkinsfile uses the declarative syntax. If you need help, check:
// Overview and structure: https://jenkins.io/doc/book/pipeline/syntax/
// For plugins and steps: https://jenkins.io/doc/pipeline/steps/
// For Github integration: https://github.com/jenkinsci/pipeline-github-plugin
// For credentials: https://jenkins.io/doc/book/pipeline/jenkinsfile/#handling-credentials
// For credential IDs: https://ci.ts.sv/credentials/store/system/domain/_/
// Docker: https://jenkins.io/doc/book/pipeline/docker/
// Custom commands: https://github.com/Tradeshift/jenkinsfile-common/tree/master/vars
// Environment variables: env.VARIABLE_NAME
pipeline {
agent any // Or you could make the whole job or certain stages run inside docker
triggers {
issueCommentTrigger('^retest$')
}
stages {
stage('Clone') {
steps {
checkout scm
}
}
stage('Sonarqube') {
when {
anyOf {
branch 'master' // Only run Sonarqube on master...
changeRequest() // ... and PRs
}
}
steps {
sonarqube()
}
}
}
}