JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 85
  • Score
    100M100P100Q82833F
  • License MIT

Gulp plugin for deploying into Amazon Elastic Beanstalk instance

Package Exports

  • gulp-elasticbeanstalk-deploy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-elasticbeanstalk-deploy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gulp-elasticbeanstalk-deploy

Usage

var gulp = require('gulp')
 ,  gulpEbDeploy = require('gulp-elasticbeanstalk-deploy')

gulp.task('deploy', function() {
    return gulp.src([
        'config/**/*',
        'lib/**/*',
        'docs/**/*.html',
        'package.json'
    ], { base: './' })
    .pipe(gulpEbDeploy({
        name: 'my-application',
        version: '1.0.0',
        timestamp: true, // optional: If set to false, the zip will not have a timestamp
        waitForDeploy: true, // optional: if set to false the task will end as soon as it is deploying
        amazon: {
            accessKeyId: "< your access key (fyi, the 'short' one) >",
            secretAccessKey: "< your secret access key (fyi, the 'long' one) >",
            region: 'eu-west-1',
            bucket: 'elasticbeanstalk-apps',
            applicationName: 'MyApplication',
            environmentName: 'my-application-env'
        }
    }))
})

The code above would work as follows

  • Take the files sepcified by gulp.src and zip them on a file named { version }-{ timestamp }.zip (i.e: 1.0.0-2016.04.08_13.26.32.zip)
  • Check amazon credentials (accessKeyId, secretAccessKey)
  • Try to create the bucket specified by amazon.bucket. If you already own it, continues; otherwise fails
  • Uploads the ziped files to the bucket on the path {{ name }}/{{ filename }} (i.e: my-application/1.0.0-2016.04.08_13.26.32.zip)
  • Creates a new version on the Application specified by applicationName with VersionLabel { version }-{ timestamp } (i.e: 1.0.0-2016.04.08_13.26.32)
  • Updates the Environment specified by environmentName by settings its application version to the new just uploaded
  • Waits for completion of the deploy process on the environment, informing on status changes