crate-ci / azure-pipelines

Easy continuous integration for Rust projects with Azure Pipelines
MIT License
88 stars 24 forks source link

Run fails with "/default.yml@templates (Line: 8, Col: 1): Unexpected value 'jobs'" #75

Closed 1wilkens closed 4 years ago

1wilkens commented 4 years ago

I recently migrated(?) my CI from the old path (azure/stages.yml) to the new default.yml but now I get the following error when running the azure pipeline: /default.yml@templates (Line: 8, Col: 1): Unexpected value 'jobs'

My azure-pipelines.yml is here and the failed build can be seen here.

Did I forgot to change something when migrating or do you have any other idea why this build fails?

epage commented 4 years ago

Something that isn't obvious is the pipeline changed from providing stages to providing jobs, so you need to change the hierarchy above the template reference.

I made this mistake after updating all of my repos. See https://github.com/assert-rs/assert_fs/commit/c061349c910a0fe73526c15bd38ff515f452151b#diff-fec826feae04e51c0d94076385408bdc for an example of the fix.

Also, in case you weren't aware, we updated our instructions for versioned releases so you don't get surprised by breaking changes (I still need to switch to this)

resources:
  repositories:
    - repository: templates
      type: github
      name: crate-ci/azure-pipelines
      ref: refs/heads/v0.3
      endpoint: YOU_NEED_TO_SET_THIS

See the ref part

jonhoo commented 4 years ago

Maybe we could add a sentence in the CHANGELOG for 0.3 to highlight the move from stages to jobs?

1wilkens commented 4 years ago

Thanks so much for the quick response. I guess the example in README.md is wrong then as well right? I'll submit a PR.

EDIT: PR to fix README.md is up #76. I also noticed that setup steps are not run for linting jobs which should be fixed in #77

jonhoo commented 4 years ago

This should now be fixed!