• Stars
    star
    48
  • Rank 575,161 (Top 12 %)
  • Language
    PowerShell
  • Created almost 13 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

YDeliver is a (opinionated) build and deployment framework aimed at .NET projects.

YDeliver

YDeliver is a (opinionated) build and deployment framework aimed at .NET projects.

YDeliver is based on Powershell and the amazing psake framework. It borrows the best practices ( for example, Ydeliver strongly believes in convention over configuration) and tricks from across the industry, with the aim of quickly bootstrapping the build and release process of typical .NET projects.

Getting Started

You can include YDeliver as submodule within your project (recommended), or just have it as a Powershell module in your machine to invoke builds off.

Import-Module path\to\YDeliver

You can also install YDeliver as a solution-level package using Nuget / Package manager:

Install-Package ydeliver

YBuild

YBuild is the build component of YDeliver. Typically, this component is for compiling, unit testing and packaging your artifacts. YBuild comes with prebuilt tasks to clean and compile your solution, run NUnit tests and package ( zip / nuget) up your artifacts.

For example, you can run the clean, compile and package tasks by doing

Invoke-YBuild Clean,Compile,Project

To get a list of available tasks, you can do:

Invoke-YBuild -listAvailable

You can override the build.yml settings by adding a -config parameter to Invoke-YBuild. See scaffolded build.ps1 for example.

YInstall

YInstall component takes care of "installing" the build artifacts - be it zip files, installers, nuget packages etc.

You can install "applications". These can be certain modules within your project - like a service, web app etc or the entire project itself. Each applications is defined to be of certain tasks and the configurations needed to install them. For example:

conventions:
    artifactsDir: "$rootDir/build"

install:
    ydeliver: 
        tasks:
            NugetPublish:
                config:
                    packages: ["ydeliver.*.nupkg"]
                    source: "NuGet official package source"

The above configuration in a install.yml defines an application ydeliver. When you install this application, the task NugetPublish is run. The config section defines the configuration needed to run the tasks. Here the nuget packages and the nuget feed source are specified.

You can override the install.yml settings by adding a -config parameter to Invoke-YInstall. See scaffolded install.ps1 for example.

YDeploy

Coming soon.

Conventions

YDeliver follows certain conventions, like where to pick up the solution file, how to recognize unit test dlls, etc. These conventions are specified under Conventions\Defaults.ps1

You can specify your own, or modify the ones provided by the framework by adding the conventions key in the component config ( like build.yml):

conventions:
    framework:  "3.5x86"
    solutionFile:   "$rootDir/name.sln"

Custom Tasks

If you cannot add your own task directly into the component's task folder ( either because you are using YDeliver as a Nuget package and don't want to touch the installed files, or if your are using YDeliver as a submodule), you can add a file in your project root named <action>.custom.tasks.ps1 and the tasks from it will be picked up as well.

For example, if you want to add custom tasks for YBuild, create a file named build.custom.tasks.ps1 and place it in the root of your project. These task will now be available from Invoke-YBuild.

Configuration

You can specify configurations like which folders to package into artifacts, which projects to make nuget packages out off etc.

build.yml

Specifies the configurations for YBuild

copyContents : For specifying files and folders to be copied from one place to another packageContents : For specifying file and folders to be packages into zip files nugetSpecs : For specifying the .nuspec files to be used to build nuget packages

Sample build.yml:

copyContents:
    "$buildPath/cmd.dll":   "$buildPath/Cmd"
    "$buildPath/cmd.pdb":   "$buildPath/Cmd"
    "$buildPath/test":      "$buildPath/Cmd"

packageContents:
    "$buildPath/Cmd":  "Cmd.zip"

nugetSpecs:   [cmd.nuspec]

##YFlow (work in progress)

YFlow is the developer workflow component. During the course of development, the developers would be running specific tasks at specific times. For example, you may want to run the dbdeploy task after updating some migrations. You may want to index solr after updating the config etc. Probably, when you run dbdeploy, you also want to reindex solr. Sometimes, these tasks may also cut across components ( YBuild, YInstall).

If you are not using workflows, you may have to do:

Invoke-YBuild dbdeploy
Invoke-YInstall solr

With YFlow, you can define these as your workflows. Scaffold the component to get workflow.ps1 and workflows.yml.

Invoke-YScaffold YFlow

workflow.yml for the above scenario will look like this:

workflow:
    dbsolr:
        ybuild: [dbdeploy]
        yinstall: [solr]

Now, you can do:

Invoke-YFlow dbsolr #or
.\workflow.ps1 dbsolr

You can merge the functionalities of build.ps1 and workflow.ps1 as appropriate.

Note that YDeliver doesn't encourage dependencies between task as specified using psake syntax. We believe it is better being explicit. YFlow may be the replacement for this.

YScaffold

This component helps you to quickly bootstrap a project's build and deploy. You can scaffold the files and scripts that are used by the different YDeliver component.

Invoke-YScaffold -Component YBuild

YScaffold will not replace files that already exist unless called with the -Force switch.

What's ahead?

Lots more documentation. Bringing in the deploy component.

More Repositories

1

cmd

C# library to run external programs in a simpler way. Demonstration of "dynamic" features of C#.
C#
352
star
2

pslinq

LINQ (LINQ2Objects) for Powershell
C#
76
star
3

gocd-docker

Docker build, run and push task plugin for GoCD
Java
38
star
4

ebs-snapshot-lambda

AWS lambda function to snapshot EBS volumes and purge old snapshots.
JavaScript
36
star
5

posz

z implementation for Powershell
PowerShell
32
star
6

redditps

Reddit provider for Powershell
C#
21
star
7

Pit

A git repository provider for Powershell
C#
14
star
8

Todo.ps1

A todo.txt implementation for Powershell
PowerShell
14
star
9

poshmarks

Implementation of bashmarks for Powershell
PowerShell
12
star
10

Toggler

Feature Toggling library for .NET.
C#
10
star
11

gocd-powershell-runner

A Powershell Task runner for gocd (http://www.go.cd)
Java
10
star
12

django-ansible

Ansible repo for a Nginx-gunicorn-postgres based Django stack
Ruby
8
star
13

thepill

Decision Trees with Neo4J
Kotlin
7
star
14

tinymce-image-caption

A simple plugin to add caption to images in tinymce4
JavaScript
6
star
15

hubot-gocd

Hubot script to report build status from GoCD (http://www.go.cd/)
CoffeeScript
5
star
16

django_ci_example

Sample django project for setting up CI
Python
4
star
17

EventBase

A single page app for events and conferences
JavaScript
4
star
18

cdposh

Implementation of cdpath for Powershell
PowerShell
3
star
19

powershell-docker

Powershell in Docker
3
star
20

chennai-devops

Ruby
2
star
21

rails_ci_example

Sample Rails application for CI with TeamCity
Ruby
2
star
22

sketch-ui

A skin over Twitter Bootstrap for UX Designers
CSS
2
star
23

lumenz

Lumenz
JavaScript
1
star
24

loksabha

Web app to display information about Lok Sabha
JavaScript
1
star