mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 13:56:47 +00:00
[Ubuntu] Update documentation generation to use shared software report module (#6823)
* Create ubuntu-report.yml * Update ubuntu-report.yml * Update ubuntu-report.yml * Update Common.Helpers.psm1 * Update ubuntu-report.yml * Update ubuntu-report.yml * Update SoftwareReport.Generator.ps1 * Update ubuntu-report.yml * Update ubuntu-report.yml * env vars * Implement language and runtime * Add package management section * fix typo * fix typo * add projectManagement and tools * fix some tools * add CLI tools, Java, PHP Tools, Haskell Tools, Rust Tools, Browsers, .NET Core * fix typo * more changes * fix typo * fix typo * fix typo * change templates * fix toolset * Update Ubuntu2004 and 2204 templates * fix cargo * fix tiny nitpicks * Fix AddToolVersionsList * Remove unused methods * Fix contructor
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
function Get-PostgreSqlVersion {
|
||||
$postgreSQLVersion = psql --version | Take-OutputPart -Part 2
|
||||
return "PostgreSQL $postgreSQLVersion"
|
||||
return $postgreSQLVersion
|
||||
}
|
||||
|
||||
function Get-MongoDbVersion {
|
||||
$mongoDBVersion = mongod --version | Select-Object -First 1 | Take-OutputPart -Part 2 -Delimiter "v"
|
||||
return "MongoDB $mongoDBVersion"
|
||||
return $mongoDBVersion
|
||||
}
|
||||
|
||||
function Get-SqliteVersion {
|
||||
$sqliteVersion = sqlite3 --version | Take-OutputPart -Part 0
|
||||
return "sqlite3 $sqliteVersion"
|
||||
return $sqliteVersion
|
||||
}
|
||||
|
||||
function Get-MySQLVersion {
|
||||
@@ -18,60 +18,47 @@ function Get-MySQLVersion {
|
||||
if (Test-IsUbuntu18) {
|
||||
$mySQLVersion = $mySQLVersion | Take-OutputPart -Part 0 -Delimiter "-"
|
||||
}
|
||||
return "MySQL $mySQLVersion"
|
||||
return $mySQLVersion
|
||||
}
|
||||
|
||||
function Get-SQLCmdVersion {
|
||||
$sqlcmdVersion = sqlcmd -? | Select-String -Pattern "Version" | Take-OutputPart -Part 1
|
||||
return "sqlcmd $sqlcmdVersion"
|
||||
return $sqlcmdVersion
|
||||
}
|
||||
|
||||
function Get-SqlPackageVersion {
|
||||
$sqlPackageVersion = sqlpackage /version
|
||||
return "SqlPackage $sqlPackageVersion"
|
||||
return $sqlPackageVersion
|
||||
}
|
||||
|
||||
function Build-PostgreSqlSection {
|
||||
$output = ""
|
||||
|
||||
$output += New-MDHeader "PostgreSQL" -Level 4
|
||||
$output += New-MDList -Style Unordered -Lines @(
|
||||
(Get-PostgreSqlVersion)
|
||||
)
|
||||
$output += New-MDCode -Lines @(
|
||||
$node = [HeaderNode]::new("PostgreSQL")
|
||||
$node.AddToolVersion("PostgreSQL", $(Get-PostgreSqlVersion))
|
||||
$node.AddNote(@(
|
||||
"User: postgres",
|
||||
"PostgreSQL service is disabled by default.",
|
||||
"Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'"
|
||||
)
|
||||
) -join "`n")
|
||||
|
||||
return $output
|
||||
return $node
|
||||
}
|
||||
|
||||
function Build-MySQLSection {
|
||||
$output = ""
|
||||
|
||||
$output += New-MDHeader "MySQL" -Level 4
|
||||
$output += New-MDList -Style Unordered -Lines @(
|
||||
(Get-MySQLVersion )
|
||||
)
|
||||
$output += New-MDCode -Lines @(
|
||||
$node = [HeaderNode]::new("MySQL")
|
||||
$node.AddToolVersion("MySQL", $(Get-MySQLVersion))
|
||||
$node.AddNote(@(
|
||||
"User: root",
|
||||
"Password: root",
|
||||
"MySQL service is disabled by default.",
|
||||
"Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
|
||||
)
|
||||
) -join "`n")
|
||||
|
||||
return $output
|
||||
return $node
|
||||
}
|
||||
|
||||
function Build-MSSQLToolsSection {
|
||||
$output = ""
|
||||
|
||||
$output += New-MDHeader "MS SQL Server Client Tools" -Level 4
|
||||
$output += New-MDList -Style Unordered -Lines @(
|
||||
(Get-SQLCmdVersion),
|
||||
(Get-SqlPackageVersion)
|
||||
)
|
||||
|
||||
return $output
|
||||
$node = [HeaderNode]::new("MS SQL")
|
||||
$node.AddToolVersion("sqlcmd", $(Get-SQLCmdVersion))
|
||||
$node.AddToolVersion("SqlPackage", $(Get-SqlPackageVersion))
|
||||
return $node
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user