Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Campus QR - Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
digital blueprint
Check In
Campus QR - Fork
Commits
6e5237f7
Commit
6e5237f7
authored
1 year ago
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
launcher: add support for mongosh
In newer MongoDB the mongo command was removed and replaced with mongosh.
parent
ab1d5294
No related branches found
No related tags found
No related merge requests found
Pipeline
#452820
passed
10 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci/launcher/run.sh
+9
-2
9 additions, 2 deletions
.gitlab-ci/launcher/run.sh
with
9 additions
and
2 deletions
.gitlab-ci/launcher/run.sh
+
9
−
2
View file @
6e5237f7
...
@@ -8,11 +8,18 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
...
@@ -8,11 +8,18 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
MONGO_URI
=
"mongodb://
$MONGO_DB_USER
:
$MONGO_DB_PWD
@
$MONGO_HOST
:
$MONGO_PORT
/
$MONGO_DB_NAME
?authSource=
$MONGO_AUTH_SOURCE
"
MONGO_URI
=
"mongodb://
$MONGO_DB_USER
:
$MONGO_DB_PWD
@
$MONGO_HOST
:
$MONGO_PORT
/
$MONGO_DB_NAME
?authSource=
$MONGO_AUTH_SOURCE
"
# In newer MongoDB the CLI was changed to mongosh (note that they are not fully compatible, so be carefull)
if
command
-v
mongosh &> /dev/null
;
then
MONGO_CLI
=
mongosh
else
MONGO_CLI
=
mongo
fi
# Test if we can connect to the DB
# Test if we can connect to the DB
mongo
"
$MONGO_URI
"
--eval
"db"
"
$MONGO_CLI
"
"
$MONGO_URI
"
--eval
"db"
# Update the config
# Update the config
mongo
"
$MONGO_URI
"
--eval
"
$(
cat
<<
EOF
"
$MONGO_CLI
"
"
$MONGO_URI
"
--eval
"
$(
cat
<<
EOF
let config = [
let config = [
{
{
_id: "multiSeatLocationsUseSmallCheckinPages",
_id: "multiSeatLocationsUseSmallCheckinPages",
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment