Changes in Jenkins/Promote [c488cf0:60380a1]
- File:
-
- 1 edited
-
Jenkins/Promote (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/Promote
rc488cf0 r60380a1 1 1 #!groovy 2 2 3 import groovy.transform.Field4 5 // Globals6 @Field def BuildDir = null7 @Field def SrcDir = null8 @Field def RemoteRepo = ''9 @Field def ArchiveUrl = ''10 11 // Local variables12 def err = null13 def log_needed = false14 15 3 node { 4 // Globals 16 5 BuildDir = pwd tmp: true 17 6 SrcDir = pwd tmp: false 18 7 RemoteRepo = 'git@github.com:cforall/cforall.git' 19 8 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 20 14 currentBuild.result = "SUCCESS" 21 15 22 // Wrap build to add timestamp to command line16 //Wrap build to add timestamp to command line 23 17 wrap([$class: 'TimestamperBuildWrapper']) { 18 24 19 PrepRepo(); 20 25 21 def name = GetArchive(); 22 26 23 PushRepo(name); 27 24 } 25 28 26 } 29 27 … … 38 36 dir (BuildDir) { 39 37 sh 'rm -rf *' 40 sshagent (credentials: ['git hub_sep2025']) {38 sshagent (credentials: ['git_key_mar27']) { 41 39 sh "git clone --bare ${RemoteRepo} repo" 42 40 } … … 61 59 } 62 60 } 61 63 62 return tarball 64 63 } … … 70 69 sh "git status" 71 70 sh "git diff-index --quiet HEAD || git commit -m 'Push from build machine: ${name}'" 72 sshagent (credentials: ['git hub_sep2025']) {71 sshagent (credentials: ['git_key_mar27']) { 73 72 sh "git push origin master" 74 73 }
Note:
See TracChangeset
for help on using the changeset viewer.