mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[MacOS] Pin MongoDB to the specific version defined in the toolset (#4452)
* Define mongodb version installed in the toolset * Searching for latest version of a tool based on a toolset version
This commit is contained in:
@@ -4,9 +4,11 @@ source ~/utils/utils.sh
|
|||||||
# MongoDB object-value database
|
# MongoDB object-value database
|
||||||
# Install latest release version of MongoDB Community Edition
|
# Install latest release version of MongoDB Community Edition
|
||||||
# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x
|
# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x
|
||||||
|
toolsetVersion=$(get_toolset_value '.mongodb.version')
|
||||||
|
|
||||||
echo "Installing mongodb..."
|
|
||||||
brew tap mongodb/brew
|
brew tap mongodb/brew
|
||||||
brew_smart_install "mongodb-community@5.0"
|
versionToInstall=$(brew search --formulae /mongodb-community@$toolsetVersion/ | awk -F'/' '{print $3}' | tail -1)
|
||||||
|
echo "Installing mongodb $versionToInstall"
|
||||||
|
brew_smart_install "$versionToInstall"
|
||||||
|
|
||||||
invoke_tests "Databases" "MongoDB"
|
invoke_tests "Databases" "MongoDB"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Describe "MongoDB" {
|
Describe "MongoDB" {
|
||||||
It "mongodb" {
|
It "<ToolName>" -TestCases @(
|
||||||
"mongo --version" | Should -ReturnZeroExitCode
|
@{ ToolName = "mongo" }
|
||||||
"mongod --version"| Should -ReturnZeroExitCode
|
@{ ToolName = "mongod" }
|
||||||
|
) {
|
||||||
|
$toolsetVersion = Get-ToolsetValue 'mongodb.version'
|
||||||
|
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -383,5 +383,8 @@
|
|||||||
"12",
|
"12",
|
||||||
"14"
|
"14"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"mongodb": {
|
||||||
|
"version": "5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,5 +341,8 @@
|
|||||||
},
|
},
|
||||||
"llvm": {
|
"llvm": {
|
||||||
"version": "13"
|
"version": "13"
|
||||||
|
},
|
||||||
|
"mongodb": {
|
||||||
|
"version": "5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,5 +293,8 @@
|
|||||||
},
|
},
|
||||||
"llvm": {
|
"llvm": {
|
||||||
"version": "13"
|
"version": "13"
|
||||||
|
},
|
||||||
|
"mongodb": {
|
||||||
|
"version": "5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,5 +191,8 @@
|
|||||||
"12",
|
"12",
|
||||||
"14"
|
"14"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"mongodb": {
|
||||||
|
"version": "5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user