Skip to content

Commit

Permalink
Can't readfile up in the guts, fair enough
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed May 3, 2017
1 parent b434f33 commit 9ec4334
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/edu/internet2/jenkins/DockerBuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ package edu.internet2.jenkins;
class DockerBuild implements Serializable {
def steps
def env
DockerBuild(env){ this.env = env }
def config
DockerBuild(env, config){
this.env = env
this.config = config
}

def tag() {
'latest'
Expand All @@ -18,7 +22,7 @@ class DockerBuild implements Serializable {
}

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

Expand Down
2 changes: 1 addition & 1 deletion vars/buildDocker.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import edu.internet2.jenkins.DockerBuild

def call(env){
build = new DockerBuild(env)
build = new DockerBuild(env, readFile('common.bash'))
echo build.maintainer()
echo build.imagename()
echo build.tag()
Expand Down

0 comments on commit 9ec4334

Please sign in to comment.