Skip to content

Commit 6dfd68f

Browse files
committed
fix for PR validation pipeline
1 parent 9a43c27 commit 6dfd68f

File tree

7 files changed

+155
-14
lines changed

7 files changed

+155
-14
lines changed

.build/Pipelines/GitHubActions.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[GitHubActions(
1010
"cd-publish-shared",
11-
GitHubActionsImage.WindowsLatest,
11+
GitHubActionsImage.UbuntuLatest,
1212
InvokedTargets = [
1313
nameof(Shared_Push),
1414
],
@@ -18,7 +18,7 @@
1818

1919
[GitHubActions(
2020
"cd-publish-extension",
21-
GitHubActionsImage.WindowsLatest,
21+
GitHubActionsImage.UbuntuLatest,
2222
InvokedTargets = [
2323
nameof(Extension_Push),
2424
],
@@ -32,13 +32,12 @@
3232
"pr-validation",
3333
GitHubActionsImage.UbuntuLatest,
3434
InvokedTargets = [
35-
nameof(Solution_Build),
35+
nameof(Solution_Clean),
3636
],
3737
OnPullRequestBranches = ["main"]
3838
)]
39-
[SuppressMessage("ReSharper", "CheckNamespace")]
4039

41-
// CI/CD targets
40+
[SuppressMessage("ReSharper", "CheckNamespace")]
4241
partial class Build
4342
{
4443
Target UpdateYaml => _ => _.Executes(() => Log.Information("Generating YAML..."));

.github/workflows/cd-publish-extension.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ on:
2727
required: true
2828

2929
jobs:
30-
windows-latest:
31-
name: windows-latest
32-
runs-on: windows-latest
30+
ubuntu-latest:
31+
name: ubuntu-latest
32+
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v4
3535
- name: 'Cache: .nuke/temp, ~/.nuget/packages'

.github/workflows/cd-publish-shared.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ on:
2424
required: false
2525

2626
jobs:
27-
windows-latest:
28-
name: windows-latest
29-
runs-on: windows-latest
27+
ubuntu-latest:
28+
name: ubuntu-latest
29+
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v4
3232
- name: 'Cache: .nuke/temp, ~/.nuget/packages'

.github/workflows/pr-validation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
.nuke/temp
3535
~/.nuget/packages
3636
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
37-
- name: 'Run: Solution_Build'
38-
run: ./build.cmd Solution_Build
37+
- name: 'Run: Solution_Clean'
38+
run: ./build.cmd Solution_Clean

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.vs/
33
.vscode/
44
.idea
5-
.nuke/
5+
.nuke/temp/
66
[Bb]in/
77
[Oo]bj/
88
packages/

.nuke/build.schema.json

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"properties": {
4+
"Configuration": {
5+
"type": "string",
6+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
7+
"enum": [
8+
"Debug",
9+
"Release"
10+
]
11+
},
12+
"ExtensionLibVersion": {
13+
"type": "string",
14+
"description": "Extension library version"
15+
},
16+
"ExtensionName": {
17+
"type": "string",
18+
"description": "Extension library name"
19+
},
20+
"PushApiKey": {
21+
"type": "string",
22+
"description": "NuGet push API key"
23+
},
24+
"SharedLibVersion": {
25+
"type": "string",
26+
"description": "Shared library version"
27+
},
28+
"Solution": {
29+
"type": "string",
30+
"description": "Path to a solution file that is automatically loaded"
31+
}
32+
},
33+
"definitions": {
34+
"Host": {
35+
"type": "string",
36+
"enum": [
37+
"AppVeyor",
38+
"AzurePipelines",
39+
"Bamboo",
40+
"Bitbucket",
41+
"Bitrise",
42+
"GitHubActions",
43+
"GitLab",
44+
"Jenkins",
45+
"Rider",
46+
"SpaceAutomation",
47+
"TeamCity",
48+
"Terminal",
49+
"TravisCI",
50+
"VisualStudio",
51+
"VSCode"
52+
]
53+
},
54+
"ExecutableTarget": {
55+
"type": "string",
56+
"enum": [
57+
"Extension_Build",
58+
"Extension_FindNextVersion",
59+
"Extension_Push",
60+
"Shared_Build",
61+
"Shared_FindNextVersion",
62+
"Shared_Push",
63+
"Solution_Build",
64+
"Solution_Clean",
65+
"Solution_Restore",
66+
"UpdateYaml"
67+
]
68+
},
69+
"Verbosity": {
70+
"type": "string",
71+
"description": "",
72+
"enum": [
73+
"Verbose",
74+
"Normal",
75+
"Minimal",
76+
"Quiet"
77+
]
78+
},
79+
"NukeBuild": {
80+
"properties": {
81+
"Continue": {
82+
"type": "boolean",
83+
"description": "Indicates to continue a previously failed build attempt"
84+
},
85+
"Help": {
86+
"type": "boolean",
87+
"description": "Shows the help text for this build assembly"
88+
},
89+
"Host": {
90+
"description": "Host for execution. Default is 'automatic'",
91+
"$ref": "#/definitions/Host"
92+
},
93+
"NoLogo": {
94+
"type": "boolean",
95+
"description": "Disables displaying the NUKE logo"
96+
},
97+
"Partition": {
98+
"type": "string",
99+
"description": "Partition to use on CI"
100+
},
101+
"Plan": {
102+
"type": "boolean",
103+
"description": "Shows the execution plan (HTML)"
104+
},
105+
"Profile": {
106+
"type": "array",
107+
"description": "Defines the profiles to load",
108+
"items": {
109+
"type": "string"
110+
}
111+
},
112+
"Root": {
113+
"type": "string",
114+
"description": "Root directory during build execution"
115+
},
116+
"Skip": {
117+
"type": "array",
118+
"description": "List of targets to be skipped. Empty list skips all dependencies",
119+
"items": {
120+
"$ref": "#/definitions/ExecutableTarget"
121+
}
122+
},
123+
"Target": {
124+
"type": "array",
125+
"description": "List of targets to be invoked. Default is '{default_target}'",
126+
"items": {
127+
"$ref": "#/definitions/ExecutableTarget"
128+
}
129+
},
130+
"Verbosity": {
131+
"description": "Logging verbosity during build execution. Default is 'Normal'",
132+
"$ref": "#/definitions/Verbosity"
133+
}
134+
}
135+
}
136+
},
137+
"$ref": "#/definitions/NukeBuild"
138+
}

.nuke/parameters.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "build.schema.json",
3+
"Solution": "RestApia.Shared.sln"
4+
}

0 commit comments

Comments
 (0)