Passing global variable between jobs?

zosrothko's Avatar

zosrothko

22 Dec, 2015 07:18 AM

Hi

Is there a way to pass global variables between jobs?

Is there a way to run a script only once within a build, and not for each jobs?

  1. Support Staff 1 Posted by Feodor Fitsner on 22 Dec, 2015 11:39 PM

    Feodor Fitsner's Avatar

    Could you please give me a real-world scenario for these requirements?

  2. 2 Posted by zosrothko on 23 Dec, 2015 04:13 AM

    zosrothko's Avatar

    We are using those steps as some kind of QA

    # search for TODO within source tree
     grep -r TODO *
    # search for FIXME within source tree
      grep -r FIXME *
    # search for HACK within source tree
      grep -r HACK *
    # some statistics about the code base
      script: sloccount .
    

    The results are the same whatever matrix row is eun. So this feature will allow to reduce the overall time of execution by running those steps only once.

  3. Support Staff 3 Posted by Feodor Fitsner on 23 Dec, 2015 10:07 PM

    Feodor Fitsner's Avatar

    How would you know which job should run that script/sequence?

    If you are not going to have multiple jobs under your account to run jobs in parallel I'd probably replace matrix with a custom PowerShell script building those combinations and running as a single job/build.

  4. zosrothko closed this discussion on 17 May, 2018 09:04 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac