Skip to content

Conversation

@ericsciple
Copy link
Contributor

This PR is for discussion only. This is something we are thinking about, that will help solve specific shortcomings we have today.

This feature is on the backlog, but it currently is not "next".

@bergmeister
Copy link

This would be useful to me as well to simplify automation of cloning build definitions at release time.


```yaml
steps:
- template: ../../steps/foo/build.yml
Copy link

Choose a reason for hiding this comment

The 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.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I believe that works today


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
Copy link
Member

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?

Copy link
Contributor

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.


## Definition creation on-push

On push, builds or releases would be created for yml files under the `builds` and `releases` directories.
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to configure the directory to look under?

Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

@bryanmacfarlane bryanmacfarlane May 9, 2018

Choose a reason for hiding this comment

The 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)

Copy link

Choose a reason for hiding this comment

The 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 .vsts-pipelines/ folder? So, your search is to find .vsts-pipelines, and then do all the yml search logic. That doesn't address the approachability aspect though.

Another option would be to have a root .vsts-config.yml file

@jaredpar
Copy link
Member

jaredpar commented Aug 1, 2018

I think this would be super useful and am eager to see it in action.

## Directory structure

```
.vsts-pipelines/

Choose a reason for hiding this comment

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

Could the folder name be shortened to .vsts/?

Copy link
Contributor

Choose a reason for hiding this comment

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

we will probably shorten to .pipelines

Choose a reason for hiding this comment

The 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 .pipelines/? I would rather the folder be specific to vsts, and have the shortest name possible.

Choose a reason for hiding this comment

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

FYI - we started using .vsts/ in aspnet, but for a different reason: we don't want build definitions to be auto-created on push. This spec didn't mention if there would be a way to prevent auto-definition creation, so we picked a folder name that isn't currently in these plans.

Copy link
Contributor

Choose a reason for hiding this comment

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

How many current build systems use/must use .pipelines for their yaml?

Choose a reason for hiding this comment

The 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 .vsts/ with your product easier than .pipelines/

@eerhardt
Copy link
Member

Is there any update on this? We are having a discussion on where to put our build .yml files (we currently have 3 'top-level' builds, and 1 phase-template .yml). Having 4 (and probably more in the future) .yml files in the root of the repo doesn't make sense to me. So we were considering putting them in a build folder.

@jtpetty jtpetty requested a review from vtbassmatt October 9, 2019 13:40
@jtpetty
Copy link

jtpetty commented Oct 9, 2019

@vtbassmatt - Can you take a look at this one?

@vtbassmatt vtbassmatt closed this Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.