Skip to content

Commit

Permalink
remove import from pipeline library
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Sep 26, 2017
1 parent 67e7174 commit b6e7c20
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Jenkinsfile
Expand Up @@ -9,29 +9,29 @@
@Field
public static final String PIPELINE_LIBRARY_BRANCH = 'ZNTA-2201-correctSHA'

library 'zanata-pipeline-library@' + PIPELINE_LIBRARY_BRANCH
import org.zanata.jenkins.Notifier
import org.zanata.jenkins.PullRequests
import static org.zanata.jenkins.StackTraces.getStackTrace

import groovy.transform.Field

// The first milestone step starts tracking concurrent build order
milestone()

PullRequests.ensureJobDescription(env, manager, steps)
@Field
def pipelineLib
// initialiser must be run separately (bindings not available during compilation phase)
pipelineLib=library('zanata-pipeline-library@' + PIPELINE_LIBRARY_BRANCH).org.zanata.jenkins

pipelineLib.PullRequests.ensureJobDescription(env, manager, steps)

@Field
def notify
// initialiser must be run separately (bindings not available during compilation phase)
notify = new Notifier(env, steps, currentBuild,
notify = pipelineLib.Notifier.new(env, steps, currentBuild,
'https://github.com/zanata/zanata-platform.git',
'Jenkinsfile', PIPELINE_LIBRARY_BRANCH,
)

// we can't set these values yet, because we need a node to look at the environment
@Field
def defaultNodeLabel

@Field
def jobName

Expand Down Expand Up @@ -90,12 +90,12 @@ String getLabel() {
} catch (e1) {
// workaround for https://issues.jenkins-ci.org/browse/JENKINS-38813
echo '[WARNING] unable to access `params`'
echo getStackTrace(e1)
echo pipelineLib.StackTraces.getStackTrace(e1)
try {
labelParam = LABEL
} catch (e2) {
echo '[WARNING] unable to access `LABEL`'
echo getStackTrace(e2)
echo pipelineLib.StackTraces.getStackTrace(e2)
}
}

Expand All @@ -116,12 +116,12 @@ boolean resolveAllFuncTests() {
} catch (e1) {
// workaround for https://issues.jenkins-ci.org/browse/JENKINS-38813
echo '[WARNING] unable to access `params`'
echo getStackTrace(e1)
echo pipelineLib.StackTraces.getStackTrace(e1)
try {
paramVal = allFuncTests
} catch (e2) {
echo '[WARNING] unable to access `allFuncTests`'
echo getStackTrace(e2)
echo pipelineLib.StackTraces.getStackTrace(e2)
}
}

Expand Down

0 comments on commit b6e7c20

Please sign in to comment.