Skip to content
Snippets Groups Projects
Commit a00620cc authored by Jan Mach's avatar Jan Mach
Browse files

Improved gruntfile to enable automatic package builds by Buildbot.

(Redmine issue: #3387)
parent 53c2d644
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,6 @@ __pycache__
parser.out
parsetab.py
# Package generation metadata for Grunt
/meta.json
# Local NodeJS modules for Grunt
/node_modules/
......
......@@ -21,7 +21,7 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: grunt.file.readJSON('meta.json'),
meta: grunt.file.readJSON('gruntconf.json'),
// Project paths to important directories.
project_paths: {
......@@ -47,6 +47,12 @@ module.exports = function(grunt) {
src: [
"<%= project_paths.package_dir %>"
]
},
// Remove separate subprojects from build subdirectory
subprojects: {
src: [
"<%= project_paths.package_dir %>usr/lib/python3/dist-packages/pynspect"
]
}
},
......@@ -243,7 +249,7 @@ module.exports = function(grunt) {
grunt.log.error(e);
grunt.fail.warn("Error parsing the JSON data.", 3);
}
grunt.file.write('meta.json', JSON.stringify(obj, null, 4));
grunt.file.write('gruntconf.json', JSON.stringify(obj, null, 4));
});
// ---------------------------------------------------------------------
......@@ -252,7 +258,11 @@ module.exports = function(grunt) {
grunt.registerTask('deb-build',
'(RUN) Build Debian packages for Mentat-ng system.',
['clean:build', 'shell:deb_archive', 'copy:deb', 'chmod', 'shell:dir_size', 'inc-version', 'save-meta', 'template:deb-control', 'shell:deb_build', 'clean:build', 'shell:deb_duplicate']
['clean:build', 'shell:deb_archive', 'copy:deb', 'clean:subprojects', 'chmod', 'shell:dir_size', 'inc-version', 'save-meta', 'template:deb-control', 'shell:deb_build', 'clean:build', 'shell:deb_duplicate']
);
grunt.registerTask('deb-buildbot',
'(RUN) Build Debian packages for Mentat-ng system by Buildbot automation system.',
['clean:build', 'shell:deb_archive', 'copy:deb', 'clean:subprojects', 'chmod', 'shell:dir_size', 'template:deb-control', 'shell:deb_build', 'clean:build', 'shell:deb_duplicate']
);
grunt.registerTask('deb-scp-upload',
'(RUN) Upload latest Debian packages to repository server, development server and demo server.',
......
......@@ -5,8 +5,6 @@ Installed-Size: <%- package_size %>
Priority: optional
Architecture: <%- architecture %>
Depends: python3, python3-jinja2, python3-ply
Conflicts: mentat-utils
Replaces: mentat-utils
Maintainer: Jan Mach <jan.mach@cesnet.cz>
Description: mentat-ng
Next generation of Mentat system written in Python3.
{
"name": "mentat-ng",
"version_minor": 82,
"version_major": "0.2",
"architecture": "all",
"pkg_server": "homeproj",
"pkg_location": "/var/reps/apt/certs/incoming",
"dev_server": "mentat-dev",
"dev_location": "/root",
"demo_server": "mentat-demo",
"demo_location": "/root",
"dep_server": "mentat-hub"
}
{
"name": "mentat-ng",
"version": "0.2.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-concat": "~0.5.1",
"grunt-contrib-copy": "~0.8.0",
"grunt-contrib-rename": "0.0.3",
"grunt-ftp-deploy": "~0.1.10",
"grunt-shell": "~1.1.2",
"load-grunt-tasks": "~3.2.0",
"npm-shrinkwrap": "~5.4.0",
"time-grunt": "~1.2.1",
"grunt-template": "~0.2.3",
"grunt-chmod": "~1.1.1"
}
"name": "mentat-ng",
"version": "2.0.0",
"description": "Distributed modular SIEM system designed to monitor networks of all sizes",
"author": "CESNET-CERTS Development Team (https://csirt.cesnet.cz/en/contact)",
"homepage": "https://mentat.cesnet.cz/en/index",
"repository": {
"type": "git",
"url": "https://homeproj.cesnet.cz/git/mentat.git"
},
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-concat": "~0.5.1",
"grunt-contrib-copy": "~0.8.0",
"grunt-contrib-rename": "0.0.3",
"grunt-ftp-deploy": "~0.1.10",
"grunt-shell": "~1.1.2",
"load-grunt-tasks": "~3.2.0",
"npm-shrinkwrap": "~5.4.0",
"time-grunt": "~1.2.1",
"grunt-template": "~0.2.3",
"grunt-chmod": "~1.1.1"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment