jenkins - Share Workspace with Jobs triggered From Workflow Script -
i want use workspace workflow task in other tasks whom trigger via 'build' command. need make flexible since want able trigger jobs various workflows different workspaces, why cannot provide hardcoded workspace path.
here code:
node { git branch: branchname, credentialsid: '1337', url: 'https://i-didnt-provide-this.but-this-is-working.git' def buildtype = 'xxx' def buildflavor = 'yyy' def hockeyappid = 'zzz' def buildtypeparam = new hudson.model.stringparametervalue('buildtype', buildtype) def buildflavorparam = new hudson.model.stringparametervalue('buildflavor', buildflavor) def hockeyappidparam = new hudson.model.stringparametervalue('hockeyappid', hockeyappid) def outputapkfilenameparam = new hudson.model.stringparametervalue('filename', '*-{buildflavor}-{buildtype}.apk') def proguardmappingparam = new hudson.model.stringparametervalue('mappingfile', '{buildflavor}/{buildtype}/mapping.txt') build job: 'android_compile', parameters: [buildtypeparam, buildflavorparam] //this needs same workspace build job: 'android_lint', parameters: [buildtypeparam, buildflavorparam] //same here build job: 'android_upload_hockey', parameters: [hockeyappidparam, outputapkfilenameparam, proguardmappingparam] //and here }
thanks in advance
rather trying share workspace, not work, archive
files need downstream jobs. can access files using copy artifact plugin.
in case, if want check out same git revision in downstream jobs, determine commit hash , pass downstream builds parameter. jenkins-26100 save manually running git rev-parse head
or like.
Comments
Post a Comment