Skip to content

Commit a1ba032

Browse files
authored
Merge pull request #19 from rails-sqlserver/drop-2017-support
Drop support for SQL Server v2017
2 parents 42e1f3f + 9ee444f commit a1ba032

File tree

3 files changed

+5
-60
lines changed

3 files changed

+5
-60
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,13 @@ jobs:
1919
- false
2020
os:
2121
# ignore ARM64 flavours
22-
- ubuntu-20.04
2322
- ubuntu-22.04
2423
- ubuntu-24.04
25-
- windows-2019
2624
- windows-2022
2725
- windows-2025
2826
version:
29-
- 2017
3027
- 2019
3128
- 2022
32-
exclude:
33-
- force-encryption: true
34-
os: ubuntu-24.04
35-
version: 2017
36-
37-
- force-encryption: false
38-
os: ubuntu-24.04
39-
version: 2017
4029

4130
runs-on: ${{ matrix.os }}
4231
steps:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This GitHub action automatically installs a SQL server and `sqlcmd` on Windows and Linux.
44

5-
On Windows, we install an Express edition of the container. On Linux, a Docker container is started. `sqlcmd` is actually preinstalled on all Windows images as well as Ubuntu 20.04 and 22.04. Essentially, it only has an effect on Ubuntu 24.04.
5+
On Windows, we install an Express edition of the container. On Linux, a Docker container is started. `sqlcmd` is actually preinstalled on all Windows images as well as Ubuntu 22.04. Essentially, it only has an effect on Ubuntu 24.04.
66

77
## Usage
88

@@ -11,7 +11,7 @@ On Windows, we install an Express edition of the container. On Linux, a Docker c
1111
* `components`: Specify the components you want to install. Can be `sqlengine` and `sqlcmd`. The list of components needs be a comma-separated list like `sqlengine,sqlcmd`. [GitHub Actions does not support passing YAML lists to composite actions](https://github.com/actions/runner/issues/2238).
1212
* `force-encryption`: When you request to install `sqlengine`, you can set this input to `true` in order to encrypt all connections to the SQL server. The action will generate a self-signed certificate for that. Default is `false`.
1313
* `sa-password`: The sa password for the SQL instances. Default is `bHuZH81%cGC6`.
14-
* `version`: Version of the SQL server you want to install (2017, 2020 or 2022).
14+
* `version`: Version of the SQL server you want to install (2019 or 2022).
1515

1616
### Example
1717

install.ps1

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ param (
33
[string[]]$Components,
44
[bool]$ForceEncryption,
55
[string]$SaPassword,
6-
[ValidateSet("2017", "2019", "2022")]
6+
[ValidateSet("2019", "2022")]
77
[string]$Version
88
)
99

@@ -45,36 +45,6 @@ if ($IsLinux) {
4545

4646
if ("sqlengine" -in $Components) {
4747
if ($IsLinux) {
48-
# the Ubuntu 24.04 image uses a kernel version which does not work with the current 2017 version.
49-
# see https://github.com/microsoft/mssql-docker/issues/868
50-
51-
# but also manual installation is difficult since MSSQL has been released for Ubuntu 18.04 only
52-
# you could backport all of this somehow, but 2017 is EOL soon anyhow
53-
# $ apt install --fix-broken -y ./mssql-server_14.0.3465.1-1_amd64.deb
54-
# Reading package lists... Done
55-
# Building dependency tree... Done
56-
# Reading state information... Done
57-
# Correcting dependencies... Done
58-
# Note, selecting 'mssql-server' instead of './mssql-server_14.0.3465.1-1_amd64.deb'
59-
# mssql-server is already the newest version (14.0.3465.1-1).
60-
# Some packages could not be installed. This may mean that you have
61-
# requested an impossible situation or if you are using the unstable
62-
# distribution that some required packages have not yet been created
63-
# or been moved out of Incoming.
64-
# The following information may help to resolve the situation:
65-
66-
# The following packages have unmet dependencies:
67-
# mssql-server : Depends: libjemalloc1 but it is not installable
68-
# Depends: libssl1.0.0 but it is not installable
69-
# Depends: python (>= 2.7.0) but it is not installable
70-
# Depends: libldap-2.4-2 but it is not installable
71-
# E: Unable to correct problems, you have held broken packages.
72-
if ($IsUbuntu2404 -And $Version -Eq "2017") {
73-
Write-Error "MSSQL 2017 is not available on Ubuntu 24.04."
74-
Write-Error "See more information at https://github.com/microsoft/mssql-docker/issues/868"
75-
exit 1
76-
}
77-
7848
if ($ForceEncryption) {
7949
Write-Output "Force encryption is set, generating self-signed certificate ..."
8050

@@ -102,17 +72,7 @@ forceencryption = 1
10272
$AdditionalContainerConfiguration = "-v /opt/mssql/mssql.conf:/var/opt/mssql/mssql.conf -v /opt/mssql/mssql.pem:/var/opt/mssql/mssql.pem -v /opt/mssql/mssql.key:/var/opt/mssql/mssql.key"
10373
}
10474

105-
if ($Version -ne "2017") {
106-
$ToolsPath = "/opt/mssql-tools18"
107-
}
108-
else {
109-
$ToolsPath = "/opt/mssql-tools"
110-
}
111-
112-
switch($Version) {
113-
"2017" {
114-
$Tag = "CU31-GDR2-ubuntu-18.04"
115-
}
75+
switch ($Version) {
11676
"2019" {
11777
$Tag = "CU30-ubuntu-20.04"
11878
}
@@ -122,7 +82,7 @@ forceencryption = 1
12282
}
12383

12484
Write-Output "Starting a Docker Container"
125-
Invoke-Expression "docker run --name=`"sql`" -e `"ACCEPT_EULA=Y`"-e `"SA_PASSWORD=$SaPassword`" --health-cmd=`"$ToolsPath/bin/sqlcmd -C -S localhost -U sa -P '$SaPassword' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`"10s`" --health-retries=3 --health-interval=`"10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `"mcr.microsoft.com/mssql/server:$Version-$Tag`""
85+
Invoke-Expression "docker run --name=`"sql`" -e `"ACCEPT_EULA=Y`"-e `"SA_PASSWORD=$SaPassword`" --health-cmd=`"/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P '$SaPassword' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`"10s`" --health-retries=3 --health-interval=`"10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `"mcr.microsoft.com/mssql/server:$Version-$Tag`""
12686
Wait-ForContainer
12787
}
12888

@@ -131,10 +91,6 @@ forceencryption = 1
13191
New-Item -ItemType Directory -Path "C:\Downloads"
13292

13393
switch ($Version) {
134-
"2017" {
135-
$DownloadUrl = "https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPR_x64_ENU.exe"
136-
$MajorVersion = 14
137-
}
13894
"2019" {
13995
$DownloadUrl = "https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe"
14096
$MajorVersion = 15

0 commit comments

Comments
 (0)