Add mariner to distro types (#520)

Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
This commit is contained in:
Jamie Magee 2021-09-30 10:20:15 -07:00 committed by GitHub
parent 0395c47445
commit 270fbb7665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -118,6 +118,11 @@ func TestIdentifyDistro(t *testing.T) {
Type: CentOS, Type: CentOS,
Version: "5.7.0", Version: "5.7.0",
}, },
{
fixture: "test-fixtures/os/mariner",
Type: Mariner,
Version: "1.0.0",
},
} }
observedDistros := internal.NewStringSet() observedDistros := internal.NewStringSet()

View File

@ -0,0 +1,9 @@
NAME="Common Base Linux Mariner"
VERSION="1.0.20210901"
ID=mariner
VERSION_ID=1.0
PRETTY_NAME="CBL-Mariner/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/cbl-mariner"
BUG_REPORT_URL="https://aka.ms/cbl-mariner"
SUPPORT_URL="https://aka.ms/cbl-mariner"

View File

@ -20,6 +20,7 @@ const (
SLES Type = "sles" SLES Type = "sles"
Photon Type = "photon" Photon Type = "photon"
Windows Type = "windows" Windows Type = "windows"
Mariner Type = "mariner"
) )
// All contains all Linux distribution options // All contains all Linux distribution options
@ -38,6 +39,7 @@ var All = []Type{
SLES, SLES,
Photon, Photon,
Windows, Windows,
Mariner,
} }
// IDMapping connects a distro ID like "ubuntu" to a Distro type // IDMapping connects a distro ID like "ubuntu" to a Distro type
@ -56,6 +58,7 @@ var IDMapping = map[string]Type{
"sles": SLES, "sles": SLES,
"photon": Photon, "photon": Photon,
"windows": Windows, "windows": Windows,
"mariner": Mariner,
} }
// String returns the string representation of the given Linux distribution. // String returns the string representation of the given Linux distribution.