Changeset 3a9aceb


Ignore:
Timestamp:
Aug 17, 2018, 2:27:57 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
0fd5003
Parents:
d2c58be
Message:

Removed first unnecessary checkout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rd2c58be r3a9aceb  
    116116        public final Boolean Silent
    117117        public final Boolean IsSandbox
    118         public final String Branch
    119         public final String Commit
    120         public final String PrevCommit
    121         public final String RepoUrl
    122118        public final String DescLong
    123119        public final String DescShort
    124120
    125         BuildSettings(java.util.Collections$UnmodifiableMap param, java.util.TreeMap scmVars) {
     121        BuildSettings(java.util.Collections$UnmodifiableMap param) {
    126122                switch( param.Compiler ) {
    127123                        case 'gcc-6':
     
    157153                this.Publish            = param.Publish
    158154                this.Silent             = param.Silent
    159                 this.IsSandbox          = scmVars.GIT_BRANCH == "jenkins-sandbox"
    160                 this.Branch             = scmVars.GIT_BRANCH
    161                 this.Commit             = scmVars.GIT_COMMIT
    162                 this.PrevCommit         = scmVars.GIT_PREVIOUS_COMMIT
    163                 this.RepoUrl            = scmVars.GIT_URL
     155                this.IsSandbox          = env.BRANCH_NAME == "jenkins-sandbox"
    164156
    165157                def full = param.RunAllTests ? " (Full)" : ""
     
    223215                ]])
    224216
    225         // Collect git information
    226         final scmVars = checkout scm
    227 
    228         echo env.CHANGE_ID
    229         echo env.CHANGE_URL
    230         echo env.CHANGE_TITLE
    231         echo env.CHANGE_AUTHOR
    232         echo env.CHANGE_AUTHOR_DISPLAY_NAME
    233         echo env.CHANGE_AUTHOR_EMAIL
    234         echo env.CHANGE_TARGET
    235 
    236         final settings = new BuildSettings(params, scmVars)
     217        final settings = new BuildSettings(params)
    237218
    238219        currentBuild.description = settings.DescShort
     
    387368        return update
    388369
    389 def output=readFile('result').trim()
    390 echo "output=$output";
     370        def output=readFile('result').trim()
     371        echo "output=$output";
    391372}
    392373
     
    402383
    403384        try {
    404                 gitUpdate = gitBranchUpdate(Settings.PrevCommit, Settings.Commit)
    405 
    406                 sh "git rev-list --format=short ${Settings.PrevCommit}...${Settings.Commit} > GIT_LOG"
     385                final scmVars = checkout(scm)
     386
     387                gitUpdate = gitBranchUpdate(scmVars.GIT_PREVIOUS_COMMIT, scmVars.GIT_COMMIT)
     388
     389                sh "git rev-list --format=short ${scmVars.GIT_PREVIOUS_COMMIT}...${scmVars.GIT_COMMIT} > GIT_LOG"
    407390                gitLog = readFile('GIT_LOG')
    408391
    409                 sh "git diff --stat ${Settings.Commit} ${Settings.PrevCommit} > GIT_DIFF"
     392                sh "git diff --stat ${scmVars.GIT_COMMIT} ${scmVars.GIT_PREVIOUS_COMMIT} > GIT_DIFF"
    410393                gitDiff = readFile('GIT_DIFF')
    411394        }
Note: See TracChangeset for help on using the changeset viewer.