DevOps scripts for CI and CD
- 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
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
Run target Init
./build.ps1 -Target "Init"
- generated project
- generated test project
- travis.yml
- appveyor.yml
- build.ps1
- build.sh
- CHANGELOG.md
- README.md
- common.props
- version.props
- src/Directory.Build.props
- test/Directory.Build.props
- stylecop integration
- Readme statuses generated
- Fill common.props: Description, PackageTags, PackageIconUrl (other attributes was filled autpmatically by init script)
Run target Default
./build.ps1 -Target "Default"
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
Run shell script: ./build.sh --target=Travis
Initializes project structure and adds all needed files
Runs:
- CreateProjectStructure
- CheckOrDownloadGitIgnore
- GitIgnoreAddCakeRule
- CreateProjects
- EditorConfig
- SourceLink
- CreateCommonProjectFiles
- AddTravisFile
- AddAppVeyorFile
- AddCakeBootstrapFiles
- AddChangeLog
- AddReadme
- AddStyleCop
Builds projects and runs tests
Runs:
Does versioning, builds projects, runs tests creates and uploads artifacts
Runs:
Builds, tests and uploads test results to appVeyor
Runs:
TODO: all tasks
add cake.build file in root of your project TODO: samples
- ScriptParam
- ScriptArgs
- Value chains
- Conventions
- props
- get value chain
Param | Description | DefaulValue |
---|---|---|
SrcDir | Sources directory. Contains projects. | src |