File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change
1
+ # This configuration file was automatically generated by Gitpod.
2
+ # Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
3
+ # and commit this file to your remote git repository to share the goodness with others.
4
+
5
+ jetbrains :
6
+ intellij :
7
+ plugins :
8
+ - zielu.gittoolbox
9
+ - com.github.lppedd.idea-conventional-commit
10
+ prebuilds :
11
+ version : stable
Original file line number Diff line number Diff line change @@ -6,19 +6,29 @@ MONGODB_PORT=$3
6
6
MONGODB_USERNAME=$4
7
7
MONGODB_PWD=$5
8
8
9
-
10
9
echo " Starting MongoDb"
11
10
echo " * port [$MONGODB_PORT ]"
12
11
echo " * version [$MONGODB_VERSION ]"
13
12
echo " * replica_set [$MONGODB_REPLICA_SET ]"
14
13
echo " * credentials [$MONGODB_USERNAME :$MONGODB_PWD ]"
15
14
docker run --name mongodb --publish $MONGODB_PORT :27017 -e MONGO_ROOT_USERNAME=$MONGODB_USERNAME -e MONGO_ROOT_PWD=$MONGODB_PWD -e MONGO_REPLICA_SET_NAME=$MONGODB_REPLICA_SET --detach mongocamp/mongodb:$MONGODB_VERSION
16
15
16
+ MONGO_SHELL_COMMAND=" mongosh"
17
+ if ! docker exec --tty mongodb /bin/bash -c " command -v $MONGO_SHELL_COMMAND &> /dev/null"
18
+ then
19
+ echo " <mongosh> could not be found use mongo"
20
+ MONGO_SHELL_COMMAND=mongo
21
+ fi
22
+
23
+ if [[ ${MONGO_SHELL_COMMAND} != ' mongosh' ]]; then
24
+ MONGO_SHELL_COMMAND=" ${MONGO_SHELL_COMMAND} --quiet"
25
+ fi
26
+
17
27
echo " Waiting for MongoDB to accept connections"
18
28
sleep 1
19
29
TIMER=0
20
30
21
- until docker exec --tty mongodb mongo -- port 27017 --eval " db.serverStatus()" # &> /dev/null
31
+ until docker exec --tty mongodb /bin/bash -c " " $MONGO_SHELL_COMMAND -- port 27017 --eval " db.serverStatus() &> /dev/null"
22
32
do
23
33
sleep 1
24
34
echo " ."
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @mongocamp/mongodb-github-action" ,
3
3
"description" : " MongoDB GitHub Action" ,
4
- "version" : " 1.1 .0" ,
4
+ "version" : " 1.2 .0" ,
5
5
"author" :
" QuadStingray <[email protected] >" ,
6
6
"bugs" : {
7
7
"url" : " https://github.com/MongoCamp/mongodb-github-action/issues"
You can’t perform that action at this time.
0 commit comments