Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'dependsOn' for individual matrix jobs #420

Closed
zmurphy-ms opened this issue Jan 7, 2020 · 4 comments
Closed

Add support for 'dependsOn' for individual matrix jobs #420

zmurphy-ms opened this issue Jan 7, 2020 · 4 comments

Comments

@zmurphy-ms
Copy link

I wanted to follow up on this comment from #20 (comment).

Hmm, I need to think more about dependsOn. I thought you could "reach into" the matrix and depend on a single resulting job, but if not, then no reason to introduce that here. (In fact, this would likely be implemented as syntactic sugar on top of matrix, so we'd get the exact same level of support.)

I don't see a way to "reach into" the matrix and depend on a single resulting job. If there is a way, I'd love to hear it. If not, adding that syntactic sugar for this would be helpful.

Example pipeline:

stages:
- stage: A
  jobs:
  - job: Build
    strategy:
      matrix:
        Release:
          Configuration: Release
        Debug:
          Configuration: Debug

    steps:
    - script: |
        echo JobName = $(System.JobName)
        echo JobDisplayName = $(System.JobDisplayName)

  - job: Test
    strategy:
      matrix:
        Release:
          Configuration: Release
        Debug:
          Configuration: Debug
    # These 'dependsOn' options give a syntax error.
    # dependsOn: "BuildRelease"
    # dependsOn: "Build Release"
    # dependsOn: "Build.Release"
    # dependsOn: "A Build Release"
    # dependsOn: "Build $(System.JobName)"
    # dependsOn: "Build $(System.JobDisplayName)"

    steps:
    - script: |
        echo JobName = $(System.JobName)
        echo JobDisplayName = $(System.JobDisplayName)
@stale
Copy link

stale bot commented Apr 25, 2020

In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community. Sorry for any confusion resulting from this move.

@stale stale bot closed this as completed Apr 26, 2020
@Saibamen
Copy link

Moved into Developer Community: https://developercommunity.visualstudio.com/idea/1007464/support-for-dependson-for-individual-matrix-jobs.html
Please use "Follow" button on the right to track it

@ghost
Copy link

ghost commented Nov 25, 2022

+1 to this. This is an extremely useful feature, esp. when the matrix items are builds done on different OSs, architectures, etc which can be later tested individually regardless of what happened to the rest.

@oggy22
Copy link

oggy22 commented Jan 22, 2023

+1 to this. Our pipelines would benefit in performance if this feature was available. This is roughly oue schema:

- job: Create
   - strategy:
      - matrix:
           Createx64
              Arch: x64
           Createx86
              Arch: x86
           CreateArm64
              Arch: arm64
- job: Test
 dependsOn: Create
   - strategy:
      - matrix:
           Testx64
              Arch: x64
           Testx86
              Arch: x86
           Testxarm
              Arch: arm64

However, I don't need Testx64 to wait for CreateArm64 only for Createx64, but there is no way to express. Oftentimes, one of the create jobs takes significantly longer than the others, which makes waiting times even worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants