Skip to content

Add DependsOn parameter to matrix job generation template#1527

Merged
1 commit merged intoAzure:masterfrom
benbp:benbp/generator-dependson
Mar 30, 2021
Merged

Add DependsOn parameter to matrix job generation template#1527
1 commit merged intoAzure:masterfrom
benbp:benbp/generator-dependson

Conversation

@benbp
Copy link
Member

@benbp benbp commented Mar 30, 2021

This is a useful parameter for scenarios like CI pipelines where the test jobs make up a subset of jobs within a stage and need to depend on another job like Build.

@benbp benbp added the Central-EngSys This issue is owned by the Engineering System team. label Mar 30, 2021
@benbp benbp self-assigned this Mar 30, 2021
@benbp benbp requested a review from a team as a code owner March 30, 2021 15:31
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

type: object
- name: DependsOn
type: object
default: null
Copy link
Member

@weshaggard weshaggard Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is null a valid value? I don't see it mentioned anywhere at https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops. Should we just leave this as empty instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The challenge I'm having is that leaving it empty marks it as a required parameter, but defaulting it to [] means my ${{ if ... }} conditional won't work. Perhaps there's a better way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just set it to '' and then compare against that string in your condition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But to your main question, it does work when empty. My understanding is it's a yaml object type, which I assume is a JSON object type, for which null is a valid field.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as it works in your testing I'm fine with this approach I just haven't seen it before and couldn't find any reference to null in the docs.

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question to investigate but otherwise looks good.

@ghost
Copy link

ghost commented Mar 30, 2021

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 2b2cd73 into Azure:master Mar 30, 2021
@benbp benbp deleted the benbp/generator-dependson branch March 30, 2021 18:32
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants