mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Add release task to upload to S3
This commit is contained in:
parent
94914d3989
commit
9912738e38
4 changed files with 40 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.aws-config.json
|
||||
.DS_Store
|
||||
node_modules
|
||||
bower_components
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
"request": "^2.40.0",
|
||||
"requirejs": "~2.1.14",
|
||||
"rjs-build-analysis": "0.0.3",
|
||||
"tar": "^1.0.1"
|
||||
"tar": "^1.0.1",
|
||||
"grunt-s3": "~0.2.0-alpha.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test --use-jruby",
|
||||
|
|
19
tasks/config/s3.js
Normal file
19
tasks/config/s3.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
module.exports = function (config) {
|
||||
return {
|
||||
release: {
|
||||
bucket: 'download.elasticsearch.org',
|
||||
access: 'private',
|
||||
//debug: true, // uncommment to prevent actual upload
|
||||
upload: [
|
||||
{
|
||||
src: 'target/<%= pkg.name %>-<%= pkg.version %>.zip',
|
||||
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.zip',
|
||||
},
|
||||
{
|
||||
src: 'target/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
|
||||
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
};
|
18
tasks/release.js
Normal file
18
tasks/release.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
module.exports = function (grunt) {
|
||||
|
||||
// build, then zip and upload to s3
|
||||
grunt.registerTask('release', [
|
||||
'distribute:load_s3_config',
|
||||
'build',
|
||||
's3:release',
|
||||
]);
|
||||
|
||||
// collect the key and secret from the .aws-config.json file, finish configuring the s3 task
|
||||
grunt.registerTask('distribute:load_s3_config', function () {
|
||||
var config = grunt.file.readJSON('.aws-config.json');
|
||||
grunt.config('s3.options', {
|
||||
key: config.key,
|
||||
secret: config.secret
|
||||
});
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue