-
Notifications
You must be signed in to change notification settings - Fork 901
YAML directory #1430
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
YAML directory #1430
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # YAML getting started - YAML directory (not available, for discussion only) | ||
|
|
||
| ## Summary | ||
|
|
||
| We plan to support a convention-based directory structure, with a couple goals in mind: | ||
|
|
||
| 1. Today we only create a build definition on-push for the root file `.vsts-ci.yml`. And resource authorization on-push is only handled for that one file. With a convention based | ||
| directory structure, we can watch for files under a specific directory. | ||
|
|
||
| 2. For template scenarios, a convention-based directory structure would enable referencing templates by name, instead of by relative path. | ||
|
|
||
| ## Directory structure | ||
|
|
||
| ``` | ||
| .vsts-pipelines/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could the folder name be shortened to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will probably shorten to .pipelines There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @natemcmaster. What happens if I use multiple build systems and they all use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI - we started using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How many current build systems use/must use .pipelines for their yaml? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None that I am aware of currently. I know that Gitlab allows for custom paths. Still, I would associate |
||
| builds/ | ||
| build.yml | ||
| releases/ | ||
| release.yml | ||
| steps/ | ||
| msbuild.yml | ||
| node.yml | ||
| phases/ | ||
| stages/ | ||
| ``` | ||
|
|
||
| ## Definition creation on-push | ||
|
|
||
| On push, builds or releases would be created for yml files under the `builds` and `releases` directories. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to configure the directory to look under? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weshaggard - no. And that's very intentional. We need to scope our search for large pushes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand the desire to limit the scope but it still feels like this could be configurable at some level (repo/definition/vsts instance). There are reasons for different projects to need a different set of directory structure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interested in those scenarios ... feel free to email/discuss with @chrisrpatterson and I as well if that's easier. There's also a desire for approachability of a repo where you can approach the repro and instantly know what it's process is (without access to the account's config). We're also considering marketing and names in this. (vsts-yaml is instantly recognizable, considering for folder as well) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to maintain the above described folder structure, but move the entire structure to some other directory and search for the existence of the Another option would be to have a root |
||
| The file names represent the definition name. | ||
|
|
||
| Subdirectories under `builds` and `releases` are supported as well, and create the same directory | ||
| structure in the web. | ||
|
|
||
| ## Template references | ||
|
|
||
| Using the `steps`, `phases`, and `stages` folders enables referring to templates by name. | ||
|
|
||
| Consider the directory structure: | ||
|
|
||
| ``` | ||
| .vsts-pipelines/ | ||
| builds/ | ||
| foo/ | ||
| foo-ci.yml | ||
| foo-pr.yml | ||
| foo-scheduled.yml | ||
| steps/ | ||
| foo/ | ||
| build.yml | ||
| ``` | ||
|
|
||
| Given the above directory structure, the steps-template can be referenced from the definition YAML file | ||
| by specifying the template's pathy-name. For example: | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - template: foo/build | ||
| ``` | ||
|
|
||
| Without relying on a convention-based layout, the relative path would need to be specified from the | ||
| definition YAML file. For example: | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - template: ../../steps/foo/build.yml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is a relative reference the only way to do this? ie, could you explicitly reference the root of the repo? steps:
- template:/eng/common/steps/foo/build.ymlThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes I believe that works today |
||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the file have to be in the root of the repo? If we put the file under another directory that isn't the root would it still work but just not auto update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root of the repo or the folder structure below if you want it to auto create.