Skip to content

Commit

Permalink
Clean-up syntax and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Blixt Daniel (Consultant) committed Feb 12, 2018
1 parent 576a042 commit 19a572d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
4 changes: 1 addition & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try {
// execute tests using the job-dsl-plugin for private branches
stage ( 'Checkout' ) {
scm checkout
}
}
stage ( 'Build XML' ) {
dir ('jobdsl-gradle') {
sh script: '''
Expand All @@ -38,7 +38,6 @@ try {
'''.stripIndent().trim()
}
}

stage ( 'Build Docker' ) {
dir ('dockerizeit') {
sh script: '''
Expand All @@ -51,7 +50,6 @@ try {
'''.stripIndent().trim()
}
}

stage ( 'Generate compose yml' ) {
dir ('dockerizeit') {
sh script: '''
Expand Down
28 changes: 17 additions & 11 deletions jobdsl-gradle/src/jobs/groovy/review_mb_pipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import job.Helpers

import javaposse.jobdsl.dsl.DslFactory
import javaposse.jobdsl.dsl.Job

Expand All @@ -17,29 +19,33 @@ dslFactory.multibranchPipelineJob( "jenkins_as_a_code-review-pipeline" ) {
if ( defaultBranch != "" ) {
excludes ( defaultBranch )
}
// Parse out repository and organisation from default_repo
repoTokens = defaultRepo.split(':')[-1].split('/')
if (repoTokens.length > 2) {
repoName = '/'.join(repoTokens[1..-1])
repoOwner( ${repoTokens[0]}
repoName = '/'.join(repoTokens[1..-1])
repoOwner( ${repoTokens[0]} )
} else if (repoTokens.length == 2 ) {
repoName = repoTokens[1]
repoOwner( ${repoTokens[0]}
repoOwner( ${repoTokens[0]} )
} else {
repoName = repoTokens[0]
}
repository ( repoName )

scanCredentialsId ( "" )
}
}

triggers {
periodic ( 240 )
}
triggers {
// Scan MB-pipeline every 4hours.
periodic ( 240 )
}

// remove dead branches and logs
orphanedItemStrategy {
discardOldItems {
// remove dead branches and logs
orphanedItemStrategy {
discardOldItems {
numToKeep( 0 )
daysToKeep( 1 )
}
}
}
}
}

0 comments on commit 19a572d

Please sign in to comment.