Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Use ScmGit as an object
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Oct 23, 2017
1 parent 0b3a205 commit b0f4f8b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Jenkinsfile
Expand Up @@ -11,13 +11,21 @@ public static final String PIPELINE_LIBRARY_BRANCH = 'ZNTA-2234-tag'
@Library('github.com/zanata/zanata-pipeline-library@ZNTA-2234-tag')
import org.zanata.jenkins.Notifier
import org.zanata.jenkins.PullRequests
import org.zanata.jenkins.ScmGit
import static org.zanata.jenkins.Reporting.codecov
import static org.zanata.jenkins.StackTraces.getStackTrace

import groovy.transform.Field

PullRequests.ensureJobDescription(env, manager, steps)

@Field
def pipelineLibraryScmGit
pipelineLibraryScmGit = new ScmGit(env, steps, 'https://github.com/zanata/zanata-pipeline-library', PIPELINE_LIBRARY_BRANCH)

@Field
def mainScmGit

@Field
def notify
// initialiser must be run separately (bindings not available during compilation phase)
Expand Down Expand Up @@ -58,7 +66,8 @@ timestamps {
}

stage('Build') {
notify.startBuilding()
mainScmGit = new ScmGit(env, steps, 'https://github.com/zanata/zanata-pipeline-library', env.BRANCH_NAME )
notify.startBuilding(mainScmGit)
sh """./mvnw -e clean verify \
--batch-mode \
--settings .travis-settings.xml \
Expand All @@ -72,7 +81,7 @@ timestamps {
junit testResults: "**/${surefireTestReports}"

// send test coverage data to codecov.io
codecov(env, steps, PROJ_URL)
codecov(env, steps, mainScmGit)

// skip coverage report if unstable
if (currentBuild.result == null) {
Expand Down

0 comments on commit b0f4f8b

Please sign in to comment.