Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/Promote

    rc488cf0 r60380a1  
    11#!groovy
    22
    3 import groovy.transform.Field
    4 
    5 // Globals
    6 @Field def BuildDir  = null
    7 @Field def SrcDir    = null
    8 @Field def RemoteRepo = ''
    9 @Field def ArchiveUrl = ''
    10 
    11 // Local variables
    12 def err = null
    13 def log_needed = false
    14 
    153node {
     4        // Globals
    165        BuildDir   = pwd tmp: true
    176        SrcDir     = pwd tmp: false
    187        RemoteRepo = 'git@github.com:cforall/cforall.git'
    198        ArchiveUrl = 'https://cforall.uwaterloo.ca/jenkins/job/Cforall_Distribute_Ref/lastSuccessfulBuild/artifact/*zip*/archive.zip'
     9
     10        // Local variables
     11        def err = null
     12        def log_needed = false
     13
    2014        currentBuild.result = "SUCCESS"
    2115
    22         // Wrap build to add timestamp to command line
     16        //Wrap build to add timestamp to command line
    2317        wrap([$class: 'TimestamperBuildWrapper']) {
     18
    2419                PrepRepo();
     20
    2521                def name = GetArchive();
     22
    2623                PushRepo(name);
    2724        }
     25
    2826}
    2927
     
    3836                dir (BuildDir) {
    3937                    sh 'rm -rf *'
    40                         sshagent (credentials: ['github_sep2025']) {
     38                        sshagent (credentials: ['git_key_mar27']) {
    4139                                sh "git clone --bare ${RemoteRepo} repo"
    4240                        }
     
    6159                }
    6260        }
     61
    6362        return tarball
    6463}
     
    7069                        sh "git status"
    7170                        sh "git diff-index --quiet HEAD || git commit -m 'Push from build machine: ${name}'"
    72                         sshagent (credentials: ['github_sep2025']) {
     71                        sshagent (credentials: ['git_key_mar27']) {
    7372                                sh "git push origin master"
    7473                        }
Note: See TracChangeset for help on using the changeset viewer.