Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
* release/2.1.0:
  (GH-725) Only look at top level folders
  (GH-716) Update ReportGenerator reference from 4.7.0 to 4.7.1
  (GH-715) Update dotnet-reportgenerator-globaltool reference from 4.7.0 to 4.7.1
  (GH-721) Further bump to 5.5.1
  (GH-721) Update GitVersion.Tool reference from 5.3.7 to 5.5.0
  (GH-719) Tagged commits on Hotfix branch do not use the correct semantic version number
  (doc) Fix up build command
  (GH-709) Update ReportGenerator reference from 4.6.7 to 4.7.0
  (GH-710) Update dotnet-reportgenerator-globaltool reference from 4.6.7 to 4.7.0
  (GH-702) Minor changes to docs
  (GH-702) added documentation for TeamCity
  • Loading branch information
gep13 committed Nov 19, 2020
2 parents 1c6f09c + b720688 commit 94746c1
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"clearcache",
"clickable",
"hotfix",
"jetbrains",
"msbuild",
"netcoreapp",
"netstandard",
Expand All @@ -35,7 +36,9 @@
"publishdocs",
"releasenotes",
"resharper",
"teamcity",
"typeof",
"vcsroot",
"vstest",
"wixproj",
"xbuild"
Expand Down
2 changes: 1 addition & 1 deletion Cake.Recipe/Content/gitreleasemanager.cake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ BuildParameters.Tasks.PublishGitHubReleaseTask = Task("Publish-GitHub-Release")
if (BuildParameters.CanUseGitReleaseManager)
{
// Concatenating FilePathCollections should make sure we get unique FilePaths
foreach (var package in GetFiles(BuildParameters.Paths.Directories.Packages + "/**/*") +
foreach (var package in GetFiles(BuildParameters.Paths.Directories.Packages + "/*") +
GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/*") +
GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/*"))
{
Expand Down
2 changes: 1 addition & 1 deletion Cake.Recipe/Content/gitversion.cake
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class BuildVersion
return new BuildVersion
{
Version = version,
SemVersion = (BuildParameters.BranchType == BranchType.HotFix || BuildParameters.BranchType == BranchType.Release && !BuildParameters.IsTagged) ? uniqueSemVersion?.ToLowerInvariant() : semVersion?.ToLowerInvariant(),
SemVersion = ((BuildParameters.BranchType == BranchType.HotFix || BuildParameters.BranchType == BranchType.Release) && !BuildParameters.IsTagged) ? uniqueSemVersion?.ToLowerInvariant() : semVersion?.ToLowerInvariant(),
Milestone = BuildParameters.IsTagged || context.HasArgument("create-pre-release") ? milestone : version,
CakeVersion = cakeVersion,
InformationalVersion = informationalVersion?.ToLowerInvariant(),
Expand Down
4 changes: 2 additions & 2 deletions Cake.Recipe/Content/packages.cake
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void PushChocolateyPackages(ICakeContext context, bool isRelease, List<Pa

foreach (var chocolateySource in chocolateySources)
{
var nupkgFiles = GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/**/*.nupkg");
var nupkgFiles = GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/*.nupkg");

var chocolateyPushSettings = new ChocolateyPushSettings
{
Expand Down Expand Up @@ -257,7 +257,7 @@ public void PushNuGetPackages(ICakeContext context, bool isRelease, List<Package

foreach (var nugetSource in nugetSources)
{
var nupkgFiles = GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/**/*.nupkg");
var nupkgFiles = GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/*.nupkg");

var nugetPushSettings = new NuGetPushSettings
{
Expand Down
6 changes: 3 additions & 3 deletions Cake.Recipe/Content/toolsettings.cake
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ public static class ToolSettings
string nunitTool = "#tool nuget:?package=NUnit.ConsoleRunner&version=3.11.1",
string nugetTool = "#tool nuget:?package=NuGet.CommandLine&version=5.7.0",
string openCoverTool = "#tool nuget:?package=OpenCover&version=4.7.922",
string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.6.7",
string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.7.1",
string reportUnitTool = "#tool nuget:?package=ReportUnit&version=1.2.1",
string codecovGlobalTool = "#tool dotnet:?package=Codecov.Tool&version=1.12.3",
string coverallsGlobalTool = "#tool dotnet:?package=coveralls.net&version=1.0.0",
string gitReleaseManagerGlobalTool = "#tool dotnet:?package=GitReleaseManager.Tool&version=0.11.0",
string gitVersionGlobalTool = "#tool dotnet:?package=GitVersion.Tool&version=5.3.7",
string reportGeneratorGlobalTool = "#tool dotnet:?package=dotnet-reportgenerator-globaltool&version=4.6.7",
string gitVersionGlobalTool = "#tool dotnet:?package=GitVersion.Tool&version=5.5.1",
string reportGeneratorGlobalTool = "#tool dotnet:?package=dotnet-reportgenerator-globaltool&version=4.7.1",
string wyamGlobalTool = "#tool dotnet:?package=Wyam.Tool&version=2.2.9",
// This is using an unofficial build of kudusync so that we can have a .Net Global tool version. This was generated from this PR: https://github.com/projectkudu/KuduSync.NET/pull/27
string kuduSyncGlobalTool = "#tool dotnet:https://www.myget.org/F/cake-contrib/api/v3/index.json?package=KuduSync.Tool&version=1.5.4-g3916ad7218"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To build this package we are using Cake.
On Windows PowerShell run:

```powershell
./build
.\build.ps1
```

On OSX/Linux run:
Expand Down
57 changes: 56 additions & 1 deletion docs/input/docs/ci-systems/teamcity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,59 @@ Title: TeamCity
Description: Running on TeamCity
---

This documentation is currently missing.
## Specifics

* `vcsroot.branch`-environment variable

Exposing the `vcsroot.branch` parameter as an environment variable is required.

## Example Config

Generally, TeamCity is configured using the UI:

* Add a new build configuration to your project
* Select a VCS-Root
* Choose "configure build steps manually" (and skip auto-detection)
* Select "PowerShell" as Runner type
* Add `build.ps1` as "Script file" and optionally some "Script arguments"

![build.ps1 in script file](./teamcity/build-step.png){.img-responsive}
* Select "Parameters" and a new parameter
* Choose `env.vcsroot.branch` as Name,
* "Environment Variable" as Kind,
* `%vcsroot.branch%` as Value

![env.vcsroot.branch variable](./teamcity/parameter.png){.img-responsive}
* At this point you are done with the basic setup and can select "Run" to try the new configuration.

The following code shows the Kotlin DSL, as can be exported in TeamCity-UI.
Though generally the build is configured using the TeamCity-UI.

```java
object Cake : BuildType({
name = "Cake"

params {
param("env.vcsroot.branch", "%vcsroot.branch%")
}

vcs {
root(SomeConfiguredVcsRoot)
}

steps {
powerShell {
scriptMode = file {
path = "build.ps1"
}
noProfile = false
param("jetbrains_powershell_scriptArguments", "--verbosity=Diagnostic")
}
}

triggers {
vcs {
}
}
})
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/input/docs/ci-systems/teamcity/parameter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94746c1

Please sign in to comment.