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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -