prod-artifact-when-good #34
Vendored
+28
-4
@@ -1,4 +1,4 @@
|
||||
def buildArtifact = false
|
||||
def buildArtifact = true
|
||||
|
||||
pipeline {
|
||||
agent { label 'ruby && freebsd' }
|
||||
@@ -43,17 +43,41 @@ pipeline {
|
||||
stage('Code Linting') {
|
||||
steps {
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||
sh 'bundle exec rubocop --format html --out rubocop.html'
|
||||
script {
|
||||
try {
|
||||
sh 'bundle exec rubocop --format html --out rubocop.html'
|
||||
} catch (e) {
|
||||
script {
|
||||
buildArtifact = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Run tests') {
|
||||
steps {
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||
sh 'bundle exec cucumber features --format html --out cucumber.html'
|
||||
script {
|
||||
try {
|
||||
sh 'bundle exec cucumber features --format html --out cucumber.html'
|
||||
} catch (e) {
|
||||
script {
|
||||
buildArtifact = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||
sh 'bundle exec rspec spec --format html --out spec.html'
|
||||
script {
|
||||
try {
|
||||
sh 'bundle exec rspec spec --format html --out spec.html'
|
||||
} catch (e) {
|
||||
script {
|
||||
buildArtifact = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user