Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
9d7f83e2
There was a problem fetching the pipeline summary.
Commit
9d7f83e2
authored
8 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Add monog_uri and mongo service do CI
parent
03a709c7
No related branches found
No related tags found
1 merge request
!21
Issue/68
Pipeline
#
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+8
-0
8 additions, 0 deletions
.gitlab-ci.yml
src/libs/app.js
+0
-2
0 additions, 2 deletions
src/libs/app.js
src/libs/db/mongoose.js
+1
-1
1 addition, 1 deletion
src/libs/db/mongoose.js
src/server.js
+2
-0
2 additions, 0 deletions
src/server.js
with
11 additions
and
3 deletions
.gitlab-ci.yml
+
8
−
0
View file @
9d7f83e2
stages
:
stages
:
-
test
-
test
services
:
-
mongo:latest
variables
:
MONGO_URI
:
'
mongodb://mongo/app_name'
NODE_ENV
:
'
test'
before_script
:
before_script
:
-
npm install --global gulp gulp-cli babel babel-cli babel-core babel-register mocha gulp-mocha gulp-eslint
-
npm install --global gulp gulp-cli babel babel-cli babel-core babel-register mocha gulp-mocha gulp-eslint
-
npm install
-
npm install
...
@@ -8,6 +15,7 @@ before_script:
...
@@ -8,6 +15,7 @@ before_script:
run_tests
:
run_tests
:
stage
:
test
stage
:
test
script
:
script
:
-
ping -W1 -c1 mongo
-
mv config.json.example config.json
-
mv config.json.example config.json
-
gulp build
-
gulp build
-
cd build/
-
cd build/
...
...
This diff is collapsed.
Click to expand it.
src/libs/app.js
+
0
−
2
View file @
9d7f83e2
...
@@ -20,8 +20,6 @@ const mongoose = require(`${libs}/db/mongoose`);
...
@@ -20,8 +20,6 @@ const mongoose = require(`${libs}/db/mongoose`);
const
db
=
mongoose
();
const
db
=
mongoose
();
process
.
env
.
NODE_ENV
=
process
.
env
.
NODE_ENV
||
'
development
'
;
app
.
use
(
bodyParser
.
json
());
app
.
use
(
bodyParser
.
json
());
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
app
.
use
(
cookieParser
());
app
.
use
(
cookieParser
());
...
...
This diff is collapsed.
Click to expand it.
src/libs/db/mongoose.js
+
1
−
1
View file @
9d7f83e2
...
@@ -7,7 +7,7 @@ const log = require(`${libs}/log`)(module);
...
@@ -7,7 +7,7 @@ const log = require(`${libs}/log`)(module);
const
mongoose
=
require
(
'
mongoose
'
);
const
mongoose
=
require
(
'
mongoose
'
);
module
.
exports
=
()
=>
{
module
.
exports
=
()
=>
{
const
mongoUri
=
config
.
get
(
'
mongodb:uri
'
);
const
mongoUri
=
process
.
env
.
MONGO_URI
||
config
.
get
(
'
mongodb:uri
'
);
log
.
debug
(
`Connecting to MongDB on URI
${
mongoUri
}
`
);
log
.
debug
(
`Connecting to MongDB on URI
${
mongoUri
}
`
);
const
db
=
mongoose
.
connect
(
mongoUri
);
const
db
=
mongoose
.
connect
(
mongoUri
);
...
...
This diff is collapsed.
Click to expand it.
src/server.js
+
2
−
0
View file @
9d7f83e2
...
@@ -8,6 +8,8 @@ const log = require(`${libs}/log`)(module);
...
@@ -8,6 +8,8 @@ const log = require(`${libs}/log`)(module);
const
app
=
require
(
`
${
libs
}
/app`
);
const
app
=
require
(
`
${
libs
}
/app`
);
process
.
env
.
NODE_ENV
=
process
.
env
.
NODE_ENV
||
'
development
'
;
app
.
set
(
'
port
'
,
process
.
env
.
PORT
||
config
.
get
(
'
port
'
)
||
3000
);
app
.
set
(
'
port
'
,
process
.
env
.
PORT
||
config
.
get
(
'
port
'
)
||
3000
);
app
.
set
(
'
ip
'
,
process
.
env
.
IP
||
config
.
get
(
'
ip
'
)
||
'
127.0.0.1
'
);
app
.
set
(
'
ip
'
,
process
.
env
.
IP
||
config
.
get
(
'
ip
'
)
||
'
127.0.0.1
'
);
...
...
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