Skip to content

Commit ad89842

Browse files
Merge pull request #20 from max-ieremenko/release/4.1.0
Release/4.1.0
2 parents e8a1255 + 71e1b4d commit ad89842

239 files changed

Lines changed: 505 additions & 1496 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Build/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
build.ps1 is designed to run on windows
44

55
- PowerShell Desktop 5.1
6-
- PowerShell Core 6.* (.net core 2.2 tests), versions 7+ are optional
7-
- InvokeBuild 5.7.2
6+
- PowerShell [7.2.1](https://github.com/PowerShell/PowerShell/releases/tag/v7.2.1) for .net 6.0 tests
7+
- PowerShell [7.1.5](https://github.com/PowerShell/PowerShell/releases/tag/v7.1.5) for .net 5.0 tests
8+
- PowerShell [7.0.8](https://github.com/PowerShell/PowerShell/releases/tag/v7.0.8) for .net core 3.1 tests
9+
- Install-Module -Name InvokeBuild -RequiredVersion 5.8.7
810
- ThirdPartyLibraries https://www.nuget.org/packages/ThirdPartyLibraries.GlobalTool/
911
- .net framework 4.7.2+ sdk
10-
- .net core 2.2 sdk
1112
- .net core 3.1 sdk
1213
- .net 5.0 sdk
1314
- docker, switched to linux containers

Build/build-tasks.ps1

Lines changed: 57 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,28 @@ task PackManualDownload PackGlobalTool, PackPoweShellModule, {
111111
$source = Join-Path $settings.artifactsPowerShell "*"
112112
Compress-Archive -Path $source -DestinationPath $destination
113113

114-
# netcoreapp2.2 build does not create .exe, copy it from netcoreapp3.1
115-
$exe = Join-Path $settings.bin "SqlDatabase\netcoreapp3.1\publish\SqlDatabase.exe"
116-
$destination = Join-Path $out "SqlDatabase.$packageVersion-netcore21.zip"
117-
$source = Join-Path $settings.bin "SqlDatabase\netcoreapp2.1\publish\*"
118-
Compress-Archive -Path $source, $exe, $lic, $thirdParty -DestinationPath $destination
119-
120114
$destination = Join-Path $out "SqlDatabase.$packageVersion-netcore31.zip"
121115
$source = Join-Path $settings.bin "SqlDatabase\netcoreapp3.1\publish\*"
122116
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
123117

124118
$destination = Join-Path $out "SqlDatabase.$packageVersion-net50.zip"
125119
$source = Join-Path $settings.bin "SqlDatabase\net5.0\publish\*"
126120
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
121+
122+
$destination = Join-Path $out "SqlDatabase.$packageVersion-net60.zip"
123+
$source = Join-Path $settings.bin "SqlDatabase\net6.0\publish\*"
124+
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
127125
}
128126

129127
task UnitTest {
130128
$builds = @(
131129
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net472" }
132-
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "netcoreapp2.1" }
133130
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "netcoreapp3.1" }
134131
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net5.0" }
132+
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net6.0" }
135133
)
136134

137-
Build-Parallel $builds -MaximumBuilds 4
135+
Build-Parallel $builds -ShowParameter targetFramework -MaximumBuilds 4
138136
}
139137

140138
task InitializeIntegrationTest {
@@ -164,9 +162,17 @@ task InitializeIntegrationTest {
164162
}
165163

166164
task PsDesktopTest {
165+
$builds = @()
167166
foreach ($database in $databases) {
168-
Invoke-Build -File "build-tasks.it-ps-desktop.ps1" -Task "Test" -settings $settings -database $database
167+
$builds += @{
168+
File = "build-tasks.it-ps-desktop.ps1";
169+
Task = "Test";
170+
settings = $settings;
171+
database = $database;
172+
}
169173
}
174+
175+
Build-Parallel $builds -ShowParameter database -MaximumBuilds 1
170176
}
171177

172178
task PsCoreTest {
@@ -190,65 +196,92 @@ task PsCoreTest {
190196
, "mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04"
191197
, "mcr.microsoft.com/powershell:7.1.3-ubuntu-20.04"
192198
, "mcr.microsoft.com/powershell:7.1.4-ubuntu-20.04"
193-
, "mcr.microsoft.com/powershell:7.2.0-preview.10-ubuntu-20.04")
199+
, "mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04"
200+
, "mcr.microsoft.com/powershell:7.2.1-ubuntu-20.04"
201+
, "mcr.microsoft.com/powershell:7.3.0-preview.1-ubuntu-20.04")
194202

195203
$builds = @()
196204
foreach ($image in $images) {
197205
foreach ($database in $databases) {
198-
$builds += @{ File = "build-tasks.it-ps-core.ps1"; Task = "Test"; settings = $settings; database = $database; image = $image }
206+
$builds += @{
207+
File = "build-tasks.it-ps-core.ps1";
208+
Task = "Test";
209+
settings = $settings;
210+
database = $database;
211+
image = $image;
212+
}
199213
}
200214
}
201215

202-
Build-Parallel $builds -MaximumBuilds 4
216+
Build-Parallel $builds -ShowParameter database, image -MaximumBuilds 4
203217
}
204218

205219
task SdkToolTest {
206220
$images = $(
207-
"sqldatabase/dotnet_pwsh:2.1-sdk"
208-
, "sqldatabase/dotnet_pwsh:3.1-sdk"
209-
, "sqldatabase/dotnet_pwsh:5.0-sdk")
221+
"sqldatabase/dotnet_pwsh:3.1-sdk"
222+
, "sqldatabase/dotnet_pwsh:5.0-sdk"
223+
, "sqldatabase/dotnet_pwsh:6.0-sdk")
210224

211225
$builds = @()
212226
foreach ($image in $images) {
213227
foreach ($database in $databases) {
214-
$builds += @{ File = "build-tasks.it-tool-linux.ps1"; Task = "Test"; settings = $settings; database = $database; image = $image }
228+
$builds += @{
229+
File = "build-tasks.it-tool-linux.ps1";
230+
Task = "Test";
231+
settings = $settings;
232+
database = $database;
233+
image = $image;
234+
}
215235
}
216236
}
217237

218-
Build-Parallel $builds -MaximumBuilds 4
238+
Build-Parallel $builds -ShowParameter database, image -MaximumBuilds 4
219239
}
220240

221241
task NetRuntimeLinuxTest {
222242
$testCases = $(
223-
@{ targetFramework = "netcore21"; image = "sqldatabase/dotnet_pwsh:2.1-runtime" }
224-
, @{ targetFramework = "netcore31"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
243+
@{ targetFramework = "netcore31"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
225244
, @{ targetFramework = "net50"; image = "sqldatabase/dotnet_pwsh:5.0-runtime" }
245+
, @{ targetFramework = "net60"; image = "sqldatabase/dotnet_pwsh:6.0-runtime" }
226246
)
227247

228248
$builds = @()
229249
foreach ($case in $testCases) {
230250
foreach ($database in $databases) {
231-
$builds += @{ File = "build-tasks.it-linux.ps1"; Task = "Test"; settings = $settings; targetFramework = $case.targetFramework; database = $database; image = $case.image }
251+
$builds += @{
252+
File = "build-tasks.it-linux.ps1";
253+
Task = "Test";
254+
settings = $settings;
255+
targetFramework = $case.targetFramework;
256+
database = $database;
257+
image = $case.image;
258+
}
232259
}
233260
}
234261

235-
Build-Parallel $builds -MaximumBuilds 4
262+
Build-Parallel $builds -ShowParameter database, targetFramework, image -MaximumBuilds 4
236263
}
237264

238265
task NetRuntimeWindowsTest {
239266
$testCases = $(
240267
"net452"
241-
, "netcore21"
242268
, "netcore31"
243269
, "net50"
270+
, "net60"
244271
)
245272

246273
$builds = @()
247274
foreach ($case in $testCases) {
248275
foreach ($database in $databases) {
249-
$builds += @{ File = "build-tasks.it-win.ps1"; Task = "Test"; settings = $settings; targetFramework = $case; database = $database }
276+
$builds += @{
277+
File = "build-tasks.it-win.ps1";
278+
Task = "Test";
279+
settings = $settings;
280+
targetFramework = $case;
281+
database = $database;
282+
}
250283
}
251284
}
252285

253-
Build-Parallel $builds -MaximumBuilds 4
286+
Build-Parallel $builds -ShowParameter database, targetFramework -MaximumBuilds 4
254287
}

Build/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.7.2'}
1+
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.8.7'}
22

33
Set-StrictMode -Version Latest
44

Build/create-images-tasks.ps1

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
task Default BuildDotnetSdk21 `
2-
, BuildDotnetRuntime21 `
3-
, BuildDotnetSdk31 `
4-
, BuildDotnetRuntime31 `
5-
, BuildDotnetSdk50 `
6-
, BuildDotnetRuntime50 `
7-
, BuildMsSqlDatabase `
8-
, BuildPgSqlDatabase `
9-
, BuildMySqlDatabase
1+
task Default `
2+
BuildDotnetSdk31 `
3+
, BuildDotnetRuntime31 `
4+
, BuildDotnetSdk50 `
5+
, BuildDotnetRuntime50 `
6+
, BuildDotnetSdk60 `
7+
, BuildDotnetRuntime60 `
8+
, BuildMsSqlDatabase `
9+
, BuildPgSqlDatabase `
10+
, BuildMySqlDatabase
1011

1112
task BuildMsSqlDatabase {
1213
$context = Join-Path $PSScriptRoot "..\Sources\SqlDatabase.Test\Docker"
@@ -38,24 +39,6 @@ task BuildMySqlDatabase {
3839
}
3940
}
4041

41-
task BuildDotnetSdk21 {
42-
exec {
43-
docker build `
44-
-f image-dotnet-sdk-2.1.dockerfile `
45-
-t sqldatabase/dotnet_pwsh:2.1-sdk `
46-
.
47-
}
48-
}
49-
50-
task BuildDotnetRuntime21 {
51-
exec {
52-
docker build `
53-
-f image-dotnet-runtime-2.1.dockerfile `
54-
-t sqldatabase/dotnet_pwsh:2.1-runtime `
55-
.
56-
}
57-
}
58-
5942
task BuildDotnetSdk31 {
6043
exec {
6144
docker build `
@@ -91,3 +74,21 @@ task BuildDotnetRuntime50 {
9174
.
9275
}
9376
}
77+
78+
task BuildDotnetSdk60 {
79+
exec {
80+
docker build `
81+
-f image-dotnet-sdk-6.0.dockerfile `
82+
-t sqldatabase/dotnet_pwsh:6.0-sdk `
83+
.
84+
}
85+
}
86+
87+
task BuildDotnetRuntime60 {
88+
exec {
89+
docker build `
90+
-f image-dotnet-runtime-6.0.dockerfile `
91+
-t sqldatabase/dotnet_pwsh:6.0-runtime `
92+
.
93+
}
94+
}

Build/create-images.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.7.2'}
1+
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.8.7'}
22

33
Set-StrictMode -Version Latest
44

Build/image-dotnet-runtime-2.1.dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM mcr.microsoft.com/dotnet/runtime:6.0
2+
3+
RUN apt-get update && \
4+
apt-get install -y liblttng-ust0 curl && \
5+
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/powershell_7.2.1-1.deb_amd64.deb --output powershell.deb && \
6+
dpkg -i powershell.deb && \
7+
apt-get install -f && \
8+
rm -f powershell.deb

Build/image-dotnet-sdk-2.1.dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0
2+
3+
RUN apt-get update && \
4+
apt-get install -y liblttng-ust0 && \
5+
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/powershell_7.2.1-1.deb_amd64.deb --output powershell.deb && \
6+
dpkg -i powershell.deb && \
7+
apt-get install -f && \
8+
rm -f powershell.deb

Build/third-party-libraries/packages/nuget.org/castle.core/4.4.0/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"Name": "SqlDatabase",
99
"InternalOnly": true,
1010
"TargetFrameworks": [
11-
"netcoreapp2.1",
1211
"netcoreapp3.1",
1312
"net5.0",
13+
"net6.0",
1414
"net472"
1515
],
1616
"Dependencies": [

0 commit comments

Comments
 (0)