Commit 990959e7 authored by Sang D NGO's avatar Sang D NGO

Merge branch 'issue#4' into 'master'

#4: Add gitlab CI

See merge request !5
parents dacebe1e 18cdf3b5
before_script:
- . ~/.nvm/nvm.sh && nvm use 8
stages:
- test
- deploy_dev
test:
stage: test
tags:
- shell
- online.net
- mongo
- redis
script:
- npm i
- npm update
- bower i
- grunt --chunk=1 --ci
.deploy_dev:
stage: deploy_dev
tags:
- dev.open-paas.org
- deployment
environment:
name: dev
url: https://dev.open-paas.org
only:
- master
script:
- cd /srv/${CI_PROJECT_NAME}
- git fetch --all
- git checkout ${CI_COMMIT_SHA}
- npm install --ignore-scripts --production
- npm update --production
- npm prune
- bower install --production
- bower prune
- git checkout -- .
- sudo /etc/init.d/rse.dev restart
......@@ -4,8 +4,8 @@
"description": "OpenPaaS Module sample to create new ones",
"main": "index.js",
"devDependencies": {
"chai": "4.1.2",
"chai-as-promised": "5.3.1",
"chai": "3.5.0",
"chai-as-promised": "5.3.0",
"chai-shallow-deep-equal": "1.4.0",
"eslint": "3.6.0",
"eslint-config-airbnb-base": "8.0.0",
......@@ -13,14 +13,15 @@
"eslint-plugin-import": "1.16.0",
"grunt": "1.0.1",
"grunt-continue": "0.1.0",
"grunt-contrib-clean": "1.1.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-jshint": "1.1.0",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "19.0.0",
"grunt-karma": "2.0.0",
"grunt-lint-pattern": "0.1.4",
"grunt-lint-pattern": "linagora/grunt-lint-pattern#7c6f4e1bc98c2851fec2714e115ac33e1b064ca7",
"grunt-mocha-cli": "3.0.0",
"grunt-puglint": "1.0.0",
"grunt-contrib-clean": "1.0.0",
"grunt-run": "0.6.0",
"grunt-run-grunt": "linagora/grunt-run-grunt.git",
"grunt-shell": "2.1.0",
......@@ -38,8 +39,8 @@
"mocha": "3.1.2",
"mockery": "1.7.0",
"mongoose": "4.7.1",
"rewire": "2.5.2",
"phantomjs-prebuilt": "2.1.12",
"rewire": "2.5.2",
"sinon": "1.17.5",
"sinon-chai": "2.8.0",
"socket.io": "1.2.1",
......@@ -56,8 +57,8 @@
},
"author": "Linagora R&D",
"license": "AGPL-3.0",
"engines" : {
"node" : ">=6.5.0"
"engines": {
"node": ">=6.5.0"
},
"dependencies": {
"awesome-module": "1.1.0",
......
......@@ -59,12 +59,16 @@ class GruntfileUtils {
(servers.redis.pwd ? '--requirepass' + servers.redis.pwd : ''),
(servers.redis.conf_file ? servers.redis.conf_file : ''));
commandObject.mongo = function() {
return util.format('%s --dbpath %s --port %s %s',
commandObject.mongo = function(repl) {
var replset = repl ?
util.format('--replSet \'%s\' --smallfiles --oplogSize 128', servers.mongodb.replicat_set_name) :
'--nojournal';
return util.format('%s --nounixsocket --dbpath %s --port %s %s',
servers.mongodb.cmd,
servers.mongodb.dbpath,
(servers.mongodb.port ? servers.mongodb.port : '23456'),
'--nojournal');
replset);
};
return commandObject;
......
......@@ -51,11 +51,22 @@ module.exports = function(config) {
ngJade2ModulePreprocessor: {
stripPrefix: 'frontend',
prependPrefix: MODULE_DIR_NAME,
cacheIdFromPath: function(filepath) {
return filepath
.replace(/pug$/, 'html')
.replace(/^frontend/, '/seed')
.replace(/^node_modules\/linagora-rse\/frontend/, '');
},
// setting this option will create only a single module that contains templates
// from all the files, so you can load them all with module('templates')
jadeRenderConfig: {
jadeRenderOptions: {
basedir: require('path').resolve(__dirname, '../../node_modules/linagora-rse/frontend/views')
},
jadeRenderLocals: {
__: function(str) {
return str;
}
},
moduleName: 'jadeTemplates'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment