Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed May 3, 2017
1 parent 3fc2e05 commit 4c9e8af
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
10 changes: 8 additions & 2 deletions src/edu/internet2/jenkins/DockerBuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ class DockerBuild implements Serializable {
}

def maintainer() {
readCommonBash('maintainer')
def m = readCommonBash('maintainer')
if(m == null){
throw "Maintainer must be defined in common.bash"
}else{
m
}

}

def readCommonBash(String key = 'maintainer') {
def matcher = config =~ (key + '="(.+)"')
matcher ? matcher[0][1] : 'null'
matcher ? matcher[0][1] : null
}

def build(args){
Expand Down
3 changes: 0 additions & 3 deletions vars/imagename.groovy

This file was deleted.

3 changes: 0 additions & 3 deletions vars/maintainer.groovy

This file was deleted.

4 changes: 0 additions & 4 deletions vars/readCommonBash.groovy

This file was deleted.

4 changes: 0 additions & 4 deletions vars/tag.groovy

This file was deleted.

0 comments on commit 4c9e8af

Please sign in to comment.