microsoft / devops-project-samples

Sample applications for Azure DevOps Project
MIT License
395 stars 1.79k forks source link

PipelineBootstrapConfigurations #155

Open thulasi-rajasekaran opened 5 years ago

thulasi-rajasekaran commented 5 years ago

I am trying to create a new Azure DevOps project with bringing your own template concept. I could successfully create the DevOps project, but CI/CD is referencing where I have my reference (some common repository) sample application. I would like to get the reference solution from my common repository and push to the newly created project’s repository. Is it possible? Here is the template I used: { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/Microsoft.Resources.json#", "contentVersion": "1.0.0.0", "parameters": { "projectSettings": { "type": "Object" }, "azureAuth": { "type": "SecureString" } }, "variables": {}, "resources": [ { "type": "microsoft.visualstudio/account", "name": "[parameters('projectSettings').accountName]", "apiVersion": "2014-02-26", "location": "[parameters('projectSettings').accountLocation]", "properties": { "operationType": "[parameters('projectSettings').accountOperationType]", "accountName": "[parameters('projectSettings').accountName]", "ownerUpn": "[parameters('projectSettings').ownerUpn]" }, "resources": [ { "type": "project", "name": "[parameters('projectSettings').projectName]", "apiVersion": "2014-02-26", "location": "[parameters('projectSettings').accountLocation]", "properties": { "ProcessTemplateId": "[parameters('projectSettings').processTemplateId]", "VersionControlOption": "[parameters('projectSettings').versionControlOption]", "ownerUpn": "[parameters('projectSettings').ownerUpn]", "PipelineBootstrapConfigurations": [ { "name": "[parameters('projectSettings').projectName]", "templateId": "ms.vss-continuous-delivery-pipeline-templates.aspnetcore-windowswebapp-byoc", "templateParameters": { "subscriptionId": "862fc568--4e94-9c80-a0a647**", "resourceGroup": "devops-byoc-rg", "webAppName": " devops-byoc", "location": "East US", "appServicePlan": "S1 Standard", "appInsightLocation": "South Central US", "azureAuth": "[parameters('azureAuth')]" }, "repository": { "repositoryType": "Git", "id": "https://portal-****@dev.azure.com/*********/Portal/_git/arm", "defaultBranch": "master", "authorization": { "authorizationType": "basic", "parameters": { "userName": "****", "userPassword": "***" } } } } ] }, "dependsOn": [ "[concat('microsoft.visualstudio/account/', parameters('projectSettings').accountName)]" ] } ] } ] }

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran this is not supported currently. If you "bring your own code", then we do not import the repository into Azure DevOps repo. The rationale for doing so is that your application code already exists in an external repo and we should create CI/CD pipeline for that rather than for a duplicate repo. Is there a reason you want to import your existing repo and create a duplicate of it?

thulasi-rajasekaran commented 5 years ago

@bishal-pdMSFT The reason is we keep our solution (Reference Architecture with boilerplate codes) in our common repository and whenever we onboard new customer we would like to run the ARM template to setup DevOps project and copy the solution from our common repository to newly created repository.

bishal-pdMSFT commented 5 years ago

@pulkitaggarwl to consider this

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran Just trying to think more about your use case. It seems you want to have a get started experience for your customers where they will get your common code and CI/CD pipeline. So, do you want just the code to be cloned to Azure DevOps repo or you also want control over the Build definition and Release definition?

thulasi-rajasekaran commented 5 years ago

@bishal-pdMSFT Both clone to DevOps repos and managing build definitions.

thulasi-rajasekaran commented 5 years ago

@bishal-pdMSFT Any update or suggestion for me?

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran I think a better fit for you would be to define a new "Pipeline template" in which you can define your source, BD and RD configuration. We already have this extensibility in the product. Let me discuss this internally in my team, and then I will come back with guidance for you.

thulasi-rajasekaran commented 5 years ago

Could you guide me to get the documentation?

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran sorry for the delay, we are discussing this internally. I will update you as soon as we have something concrete to share with you.

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran just to update you. We discussed this internally and I have started work on writing a doc for you. I will give you the link once I have the doc ready.

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran I have added a doc here

Please let me know if you have more questions or have feedback.

bishal-pdMSFT commented 5 years ago

@thulasi-rajasekaran did you get a change to go through the doc?