Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Can't readfile up in the guts, fair enough
Jim Van Fleet committed May 3, 2017
1 parent b434f33 commit 9ec4334
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/edu/internet2/jenkins/DockerBuild.groovy
@@ -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'
@@ -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'
}

2 changes: 1 addition & 1 deletion vars/buildDocker.groovy
@@ -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()

0 comments on commit 9ec4334

Please sign in to comment.