GithubHelp home page GithubHelp logo

svdlinde42 / repository.provisioner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azdocs/repository.provisioner

0.0 0.0 0.0 43 KB

Automatically provisions repositories based on template repositories. Including replacement of placeholders & GUID management for project files & automatic devops pipelines.

License: GNU General Public License v3.0

C# 100.00%

repository.provisioner's Introduction

AzDocs Repository.Provisioner

Create template repo's and provision new repo's with these templates using this Azure Function. Including replacement of placeholders & GUID management for project files & automatic devops pipelines.

The function relies heavily on a naming standarization. It expects your repositoryname to consist out of a generic platform/company name, a repository type and the componentname. It should be called something like MyPlatform.MyRepoType.MyComponent. The template repository used for this example will be MyPlatform.Templates.MyRepoType. It will then copy the template repo, replace placeholders and commit the output to the newly created repository. In this way, it becomes painless to create new repositories for, for example, your microservices. The pipeline will also be automatically added to the Azure DevOps Pipelines module. This gets you right into developing features!

As with other AzDocs components, this will only work in combination with Azure & Azure DevOps.

Environment variables needed

Variable name Example value Description
AzureDevOps.OrganizationName mydevopsorg The organization name of your Azure DevOps instance.
AzureDevOps.PersonalAccessToken xfn2q7kdv9sypb2d3mvqtgdyx7xsba926q5rat2mn62ynj7347vf Your Personal Access Token which has read&write access to the repositories you want to use this provisioner for.
AzureDevOps.Repository.YamlPipelineFilePath pipeline-orchestrator.yml The path to your pipeline YAML.
AzureDevOps.Repository.Author.Name John Doe Your displayname to be used in the GIT commit while provisioning the repositories.
AzureDevOps.Repository.Author.Email [email protected] Your e-mailadress to be used in the GIT commit while provisioning the repositories.
AzureDevOps.Pipeline.BuildAgentQueueName Hosted Ubuntu 1604 The buildqueue name. For now we recommend using Hosted Ubuntu 1604 as the value. Other values seem to have bugs. You can override the real buildqueue in your YAML pipeline.

How to install

  1. Deploy this Azure Function
  2. Add a Service Hook (with the type Webhook) in your Azure DevOps TeamProject with a trigger on Code Pushes to Any repository, branch or member of a group.
  3. Create a template repo Test.Templates.Microservice
  4. Put some files inside the Test.Templates.Microservice repo. Make sure to put [[COMPONENTNAME]] somewhere in the filenames or in the file contents.
  5. Make sure to also put in a YAML Pipeline into the repo (we use pipeline-orchestrator.yml for this in the root of the repository).
  6. Create a new repo Test.Microservice.MyFirstMicroservice (make sure to commit a readme or anything, so that there will be a code push initialized) and wait a few seconds.
  7. Refresh the page and you will see the processed files from the Test.Templates.Microservice repository in your new Test.Microservice.MyFirstMicroservice repository!
  8. Go to Pipelines --> All and find your new pipeline imported!

repository.provisioner's People

Contributors

robhofmann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.