This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker.withRegistry('', 'dockerhub-credentials-cleclerc') { | |
writeFile file: "${pwd()}/.m2/settings.xml", text: "<settings><localRepository>${pwd()}/.m2/repo</localRepository></settings>" | |
stage 'Build Web App' | |
docker.image('cloudbees/java-build-tools:0.0.5').inside { | |
git 'https://github.com/cyrille-leclerc/game-of-life.git' | |
sh "mvn -B -V -s ${pwd()}/.m2/settings.xml clean package" | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Takes a Sails Model object (e.g. User) and a ValidationError object and translates it into a friendly | |
* object for sending via JSON to client-side frameworks. | |
* | |
* To use add a new object on your model describing what validation errors should be translated: | |
* | |
* module.exports = { | |
* attributes: { | |
* name: { | |
* type: 'string', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// make a module in node_modules named 'my-validation-utils'. create a index.js file there. and put the following content there: | |
var user = { | |
email:{ | |
required:'Email Required', | |
email:'Should be an email' | |
}, | |
name:{ | |
required:'name required' | |
} |