MicroElements.DevOps 1.5.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package MicroElements.DevOps --version 1.5.0
NuGet\Install-Package MicroElements.DevOps -Version 1.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MicroElements.DevOps" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroElements.DevOps --version 1.5.0
#r "nuget: MicroElements.DevOps, 1.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MicroElements.DevOps as a Cake Addin
#addin nuget:?package=MicroElements.DevOps&version=1.5.0

// Install MicroElements.DevOps as a Cake Tool
#tool nuget:?package=MicroElements.DevOps&version=1.5.0

MicroElements.DevOps

DevOps scripts for CI and CD

Statuses

License NuGetVersion NuGetDownloads MyGetVersion

Travis AppVeyor Coverage Status

Gitter

Main features

  • Based on CakeBuild
  • Supported OS: Windows, Linux
  • Supported CI: Travis, AppVeyor, Jenkins, any other
  • C# project generation or initialization with CI and CD included
  • Only two files: build.ps1 and build.sh. All other files can be generated
  • No need to maintain your own build scripts
  • You can customize and add own tasks if you need

Getting started

1. Download bootstrap script

Open a new PowerShell window and run the following command.

Invoke-WebRequest https://raw.githubusercontent.com/micro-elements/MicroElements.DevOps/master/resources/build.ps1 -OutFile build.ps1

2. Initialize component

Run target Init

./build.ps1 -Target "Init"

3. Usage

Local build

Run target Default

./build.ps1 -Target "Default"
Travis CI

Add file .travis.yml to project

language: csharp
mono: none
dotnet: 2.1.300
os:
  - linux
before_script:
  - chmod a+x ./build.sh
script:
  - ./build.sh --target=Travis --verbosity=normal
Other CI

Run shell script: ./build.sh --target=Travis

Tasks

Init

Initializes project structure and adds all needed files

Runs:

Default

Builds projects and runs tests

Runs:

Travis

Does versioning, builds projects, runs tests creates and uploads artifacts

Runs:

AppVeyor

Builds, tests and uploads test results to appVeyor

Runs:

CreateProjectStructure

TODO: all tasks

Features

Customize build

add cake.build file in root of your project TODO: samples

Concepts

  • ScriptParam
  • ScriptArgs
  • Value chains
  • Conventions

ScriptParam

  • props
  • get value chain

ScriptArgs

Param | Description | DefaulValue ---|---|--- SrcDir | Sources directory. Contains projects. | src TODO: all params

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.11.0 2,994 5/31/2020
1.10.0 2,080 5/31/2020
1.9.1 2,814 6/3/2019
1.9.0 2,565 4/23/2019
1.8.0 2,415 1/21/2019
1.7.3 2,502 12/23/2018
1.7.2 2,446 12/22/2018
1.7.1 2,438 12/22/2018
1.7.0 2,540 9/17/2018
1.6.0 2,721 8/12/2018
1.5.0 2,667 8/7/2018
1.4.1 2,689 8/3/2018
1.4.0 2,601 8/2/2018
1.3.0 2,928 7/23/2018
1.2.0 2,464 7/21/2018
1.1.0 2,734 7/17/2018
1.0.0 2,635 7/14/2018
1.0.0-beta.2 711 7/10/2018
1.0.0-beta.1 593 7/9/2018
0.5.0 2,817 6/18/2018
0.5.0-rc.3 605 6/18/2018
0.5.0-rc.2 607 6/14/2018
0.5.0-rc.1 607 6/12/2018
0.5.0-beta.6 597 6/12/2018
0.5.0-beta.5 615 6/12/2018
0.5.0-beta.4 513 6/12/2018
0.5.0-beta.3 589 6/11/2018
0.5.0-beta.2 641 5/27/2018
0.5.0-beta.1 616 5/27/2018
0.4.0 2,970 5/16/2018
0.3.0 2,956 5/12/2018
0.2.0 2,756 5/12/2018
0.1.0 2,932 5/11/2018

# 1.5.0
- Added: `AddReadme` target (Adds filled readme), task added to `Init` task
- Added: `UpdateReadmeBadges` target (Updates statuses section in readme)
- Added KeyEqualityComparer for customizing key comparation

# 1.4.1
- Fixed: HasValue for ParamValue<T> where T is ValueType

# 1.4.0
- Added: `SetEmptyValues` for ScriptParam to treat some values as NoValue
- Changed: `TestSourceLink` option value is true for CI servers because local builds are often not committed.
- Fixed: Bug "Default value for ParamValue treats as NoValue"

# 1.3.0
- Added: `CodeCoverage` task
- Added: Coverlet CodeCoverage. see `UseCoverlet`
- Added: Task `UploadCoverageReportsToCoveralls` to upload coverage results to coveralls.io
- Added: ScriptParam `COVERALLS_REPO_TOKEN` to target caveralls.io project
- Added: `CodeCoverage` and `UploadCoverageReportsToCoveralls` added to `Travis` task
- Added: Directory.Build.props for Tests
- Changed: `CopyPackagesToArtifacts` placed after `Build` task because `Test` and `CodeCoverage` can build projects with other build parameters

# 1.2.0
- Added: `PrintHeader` for header printing using Figlet, added `Header` param.
- Added: functional stuff
- Fixed: Value override for list params
- Changed: `PrintParams` prints the same info that on build

# 1.1.1
- Bugfix: fixed build.sh script path

# 1.1.0
- Added task `UploadTestResultsToAppVeyor` to `AppVeyor` task
- Added task `AddAppVeyorFile`
- New: `AddFileFromTemplate` supports options and can fill template from params
- Changes: `ArtifactsDir` now is in `RootDir` by default
- Changes: `TestResultsDir` is the child of `ArtifactsDir`
- Changes: `PackagesDir` is the child of `ArtifactsDir`
- Bugfix: `DefaultValue` ParamSource is now always at the and of GetValueChain

# 1.0.0
The first major version.
- Includes main tasks: Init, Default, Travis, AppVeyor
- Task `Init` runs: CreateProjectStructure, CheckOrDownloadGitIgnore, GitIgnoreAddCakeRule, CreateProjects, EditorConfig, SourceLink, CreateCommonProjectFile, AddTravisFile, AddCakeBootstrapFiles, AddChangeLog, AddStyleCop
- Task `Default` runs: Build, Test, CopyPackagesToArtifacts
- Task `Travis` runs: DoVersioning, Build, Test, CopyPackagesToArtifacts, UploadPackages
- Task `AppVeyor` runs: Build, Test
- All scripts builded on concepts:
   - ScriptArgs contains all script params
   - ScriptParam:
       - Can be initializes from command line args, environment variables
       - Can be initialized from attributes: DefaultValue, ScriptParamAttribute
       - Evaluates by conventions
       - Can contain list values
- Scripts splitted on several files
- Extended customization

# 1.0.0-beta.2
- VersionParam
- used NugetSource, removed old non list nuget_sourceX params

# 1.0.0-beta.1
## Breaking changes:
- Removed ScriptParamFactory - all factory methods moved to ScriptParam for simplicity
- AutoCreation script params with Initialize methods. Initialize creates script param, initializes param from attributes, sets default getters from arguments and from environment variables.
- Added overriden operator ```/``` that combines ```ScriptParam<DirectoryPath>``` with string and gets combined DirectoryPath

# 0.5.0
- Redesigned ScriptParam and ScriptArgs
- New Targets: AddTravisFile, CopyPackagesToArtifacts, UploadPackages, AddStyleCop
- Added versioning (Manual and for some CI)
- Added generate package on build
- Added build.sh to resources and AddCakeBootstrapFiles target
- Build and Test moved to build.cake
- Added many common util methods
- Scenarios moved from common
- DotNetPack with releaseNotes

# 0.4.0
- Common props created
- Added: fill common props from github

# 0.3.0
- Create version.props
- GetVersionFromCommandLineArgs, ReadTemplate
- Idempotent CreateProjectStructure
- Versioning methods

# 0.2.0
- Vesion that works from nuget pakage
- Init target: CreateProjectStructure, GitIgnore, CreateProjects, EditorConfig, SourceLink

# 0.1.0
- Initial version