Skip to content

Commit dfb94c1

Browse files
authored
Merge branch 'main' into fix-2927
2 parents 1a7eb78 + debc84f commit dfb94c1

File tree

14 files changed

+11623
-14
lines changed

14 files changed

+11623
-14
lines changed

.github/mergify.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pull_request_rules:
88
- name: Automatic merge on dependabot PR after success CI
99
conditions:
1010
- author~=^dependabot(|-preview)\[bot\]$
11+
- '#commits-behind=0' # Only merge up to date pull requests
1112
- check-success=DotNet Format
1213
- check-success=Release
1314
- check-success=Unit Test code (windows-latest, netcoreapp3.1)
@@ -18,8 +19,6 @@ pull_request_rules:
1819
- check-success=Unit Test code (windows-latest, net5.0)
1920
actions:
2021
merge:
21-
method: rebase
22-
strict: smart
2322
- name: Thank contributor
2423
conditions:
2524
- merged

.github/workflows/docs.yml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- 'docs/**'
7+
- docs/**
8+
- package*.json
9+
- markdownlint.json
10+
- .remarkrc.yaml
11+
- mkdocs.yml
12+
- .github/workflows/docs.yml
813
pull_request:
914
paths:
10-
- 'docs/**'
15+
- docs/**
16+
- package*.json
17+
- markdownlint.json
18+
- .remarkrc.yaml
19+
- mkdocs.yml
20+
- .github/workflows/docs.yml
1121
env:
1222
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
1323

@@ -40,6 +50,18 @@ jobs:
4050
with:
4151
path: tools
4252
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
53+
-
54+
name: Get npm cache directory
55+
id: cache-node-dir
56+
run: echo "::set-output name=dir::$(npm config get cache)"
57+
-
58+
name: Cache Node Modules
59+
id: cache-node
60+
uses: actions/[email protected]
61+
with:
62+
path: ${{ steps.cache-node-dir.outputs.dir }}
63+
key: node-${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
64+
restore-keys: node-${{ runner.os }}
4365
-
4466
name: Install .NET SDK 6.0.x
4567
uses: actions/setup-dotnet@v1
@@ -83,19 +105,26 @@ jobs:
83105
name: '[Build Documentation]'
84106
shell: pwsh
85107
run: dotnet run/docs.dll --target=BuildDocs
86-
87108
-
88109
name: '[HTMLProofer]'
89110
uses: chabad360/htmlproofer@master
90111
with:
91112
directory: ./artifacts/docs/preview
92113
arguments: --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
114+
-
115+
name: Reviewdog Reporter
116+
uses: haya14busa/action-cond@v1
117+
id: reporter
118+
with:
119+
cond: ${{ github.event_name == 'pull_request' }}
120+
if_true: github-pr-review
121+
if_false: github-check
93122
-
94123
name: '[Remark Lint]'
95-
uses: reviewdog/action-remark-lint@v5
124+
uses: reviewdog/action-remark-lint@v5.2
96125
with:
97126
github_token: ${{ secrets.GITHUB_TOKEN }}
98-
reporter: github-pr-check
127+
reporter: ${{ steps.reporter.outputs.value }}
99128

100129
publish:
101130
name: Publish docs

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,7 @@ config.wyam.hash
127127
config.wyam.packages.xml
128128
/tests/integration/core/build
129129
/tests/integration/full/build
130-
docs/output
130+
docs/output
131+
132+
# NPM
133+
node_modules
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
Order: 40
3+
Title: Buildkite
4+
Description: Details on the Buildkite support in GitVersion
5+
RedirectFrom: docs/build-server-support/build-server/buildkite
6+
---
7+
8+
If you use [Buildkite][buildkite] then you will have to use GitVersion from the command line as there is currently no GitVersion Buildkite plugin.
9+
10+
## Gotchas
11+
12+
By default Buildkite calls `git fetch` with the flags `-v --prune` which can cause issues on new build agents since branches or tags might not be available locally on the build agent when GitVersion runs. This can be fixed by altering the [Buildkite agent configuration][configuration] either by:
13+
* Setting the environment variable `BUILDKITE_GIT_FETCH_FLAGS` to `-v --tags`
14+
* Setting configuration value `git-fetch-flags` to `-v --tags` in your agent configuration file
15+
16+
If you are running GitVersion in a docker container make sure to propogate the `BUILDKITE` and `BUILDKITE_BRANCH` environment variables (c.f. example below).
17+
18+
## Example
19+
20+
There are many ways to run GitVersion in a Buildkite pipeline. One way using the GitVersion docker image and using [build meta-data][meta-data] to share version info between build steps. Such a pipeline might look like the following:
21+
22+
```yaml
23+
env:
24+
BUILDKITE_GIT_FETCH_FLAGS: "-v --tags"
25+
26+
steps:
27+
- label: "Calculate version"
28+
command: buildkite-agent meta-data set "GitVersion_SemVer" $(./dotnet-gitversion -showvariable SemVer)
29+
plugins:
30+
- docker#v3.9.0:
31+
image: "gittools/gitversion"
32+
environment:
33+
- "BUILDKITE"
34+
- "BUILDKITE_BRANCH"
35+
36+
- wait
37+
38+
- label: "Use calculated version"
39+
command: echo "Calculated version is $(buildkite-agent meta-data get "GitVersion_SemVer")"
40+
```
41+
42+
Another way could be via the [Buildkite hooks][hooks]. Adding the following line to the `.buildkite/hooks/post-checkout` file:
43+
44+
```shell
45+
eval $(gitversion | jq -r 'to_entries[] | "buildkite-agent meta-data set GitVersion_\(.key) \(.value)"')
46+
```
47+
48+
Assuming your Buildkite agent has dotnet and gitversion installed and on the path, all the calculated GitVersion variables will have a corresponding meta-data key set.
49+
50+
[buildkite]: https://buildkite.com/
51+
[configuration]: https://buildkite.com/docs/agent/v3/hooks
52+
[hooks]: https://buildkite.com/docs/agent/v3/hooks
53+
[meta-data]: https://buildkite.com/docs/agent/v3/cli-meta-data

docs/input/docs/reference/build-servers/continua.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 40
2+
Order: 50
33
Title: Continua CI
44
Description: Details on the Continua CI support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/continua

docs/input/docs/reference/build-servers/gitlab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 50
2+
Order: 60
33
Title: GitLab CI
44
Description: Details on the GitLab CI support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/gitlab

docs/input/docs/reference/build-servers/jenkins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 60
2+
Order: 70
33
Title: Jenkins
44
Description: Details on the Jenkins support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/jenkins

docs/input/docs/reference/build-servers/myget.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 70
2+
Order: 80
33
Title: MyGet
44
Description: Details on the MyGet support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/myget

docs/input/docs/reference/build-servers/octopus-deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 80
2+
Order: 90
33
Title: Octopus Deploy
44
Description: Details on the Octopus Deploy support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/octopus-deploy

docs/input/docs/reference/build-servers/teamcity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 90
2+
Order: 100
33
Title: TeamCity
44
Description: Details on the TeamCity support in GitVersion
55
RedirectFrom: docs/build-server-support/build-server/teamcity

0 commit comments

Comments
 (0)