Grunt task for deploying using pkgcloud
npm install grunt-pkgcloud> Grunt task for deploying using pkgcloud
~0.4.5If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
``shell`
npm install grunt-pkgcloud --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-pkgcloud');
to the data object passed into grunt.initConfig().`js
grunt.initConfig({
pkgcloud: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
`$3
#### options.createContainer
Type:
Boolean
Default value: trueIf the specified
dest container does not exists, should one be created?#### options.metadata
Type:
Object
Default value: {}Extra metadata to apply to the uploaded files.
#### options.client
Type:
Object
Default value: undefinedThe client definition for a pkgcloud storage provider.
$3
#### Default Options
Deploy files to your OpenStack environment in the
test container using the default settings. The files section
currently only has support Grunt's "Files Array" mapping format, and the cwd option has to be specified.`js
grunt.initConfig({
pkgcloud: {
staging: {
options: {
client: {
authUrl: 'https://identity.stack.cloudvps.com',
username: 'foo',
password: 'bar',
provider: 'openstack',
tenantId: 'moo'
}
},
files: [{
cwd: 'dist',
src: '**',
dest: 'test'
}]
}
}
});
``