Skip to content

Incorrect conditions in eng/common/templates/job/job.yml #12393

@RussKie

Description

@RussKie
  • This issue is blocking
  • This issue is causing unreasonable pain

I believe the following conditions are incorrect:

Essentially, they imply the following: "Run the task if (argument == 'true' OR argument != '')" which is always true unless the argument is not specified at all. And this is super weird and unexpected. E.g., the following configuration still runs the tasks:

  jobs:
  - template: /eng/common/templates/jobs/jobs.yml
    parameters:
      artifacts:
        publish:
          artifacts: false
          logs: true
          manifests: false

image

Only after I have completely removed the entries, it worked as expected:

  jobs:
  - template: /eng/common/templates/jobs/jobs.yml
    parameters:
      artifacts:
        publish:
-         artifacts: false
          logs: true
-         manifests: false

image

I am pretty sure the conditions are meant to be the following: "Run the task if (argument == 'true' OR argument == '')" - i.e., run the task only if

  • the argument isn't supplied - assume it's true, or
  • the argument is true.

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions