Code Monkey home page Code Monkey logo

ember-cli-deploy-slack's Introduction

Ember CLI Deploy

Build Status Code Climate

Simple, flexible deployment for your Ember CLI app

Installation

ember install ember-cli-deploy

Quick start

After installation, choose plugins matching your deployment environment, configure your deployment script appropriately and you're ready to start deploying.

In-depth documentation

Visit the Docs site

Contributing

Clone the repo and run npm install. To run tests,

npm test

ember-cli-deploy-slack's People

Contributors

ember-tomster avatar ghedamat avatar joshuaconner avatar jrowlingson avatar kategengler avatar leizhao4 avatar levelbossmike avatar lukemelia avatar mjcbsn22 avatar olleolleolle avatar phillbaker avatar thejohnnybot avatar wolodarsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-cli-deploy-slack's Issues

"didFail" hook is not working

Hi guys, I've created a custom "willDeploy", "didDeploy" and "didFail" hooks, "willDeploy" hook and "didDeploy" hook works, but the "didFail" hook isn't working for me when the CI got an error, anyone faced something similar?

Cannot convert object to primitive value when ember-cli-deploy-slack not installed but specified in deploy.js

Hello,

I had been ripping small amounts of hair out over the past few days trying to get lightning deploys working again for our teams. I finally realized that I had forgotten to install the Slack plugin. The fix was simple (ember install ember-cli-deploy-slack) but the pain was real. Here's what this error looks like:

17:23 $ ember deploy:list stage
version: 1.13.15
Cannot convert object to primitive value
TypeError: Cannot convert object to primitive value
  at String (native)
  at Function.applyStyle (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/chalk/index.js:57:45)
  at Chalk.builder (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/chalk/index.js:40:21)
  at writeError (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/lib/ui/write-error.js:19:24)
  at UI.writeError (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/lib/ui/index.js:92:3)
  at Class.module.exports.Task.extend._configuredPlugins (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:115:15)
  at Class.module.exports.Task.extend.setup (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:37:22)
  at Class.module.exports.Task.extend.run (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:87:10)
  at /Users/spetrow/projects/music_rights_ui/node_modules/ember-cli-deploy/lib/commands/list.js:51:23
  at lib$rsvp$$internal$$tryCatch (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
  at lib$rsvp$$internal$$invokeCallback (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
  at /Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:331:11
  at lib$rsvp$asap$$flush (/Users/spetrow/projects/music_rights_ui/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
  at process._tickCallback (node.js:355:11)

The fix:

17:23 $ ember install ember-cli-deploy-slack
version: 1.13.15
Installed packages for tooling via npm.
Installed addon package.
✔ ~/projects/music_rights_ui [staging|✚ 2…1]
17:24 $ ember deploy:list stage
version: 1.13.15
- Listing revisions for key: `music-rights-ui-stage:index`
-   revision
- ===========
- > 4837452
-   c76ef39

Package.json:

Versions:

✔ ~/projects/music_rights_ui [staging|✚ 2…1]
17:24 $ node --version
v0.12.7
✔ ~/projects/music_rights_ui [staging|✚ 2…1]
17:30 $ ember --version
version: 1.13.15
node: 0.12.7
npm: 2.14.10
os: darwin x64

This also happened on our Jenkins CI which runs:

npm install
bower install

ember deploy ${EMBER_ENVIRON} --verbose --activate

Even on latest stable node (v5.7.1 (npm v3.6.0) ) it happens when using this deploy.js:

var VALID_DEPLOY_TARGETS = [ //update these to match what you call your deployment targets
  'dev',
  'test',
  'stage',
  'prod'
];

module.exports = function(deployTarget) {
  var PROJECT_NAME = 'ember-cli-skeleton';  // TODO change me when settting up a new BOLT project

  var ENV = {
    build: {},
    redis: {
      // docs https://github.com/ember-cli-deploy/ember-cli-deploy-redis
      host: '[REDACTED]',
      allowOverwrite: true,
      keyPrefix: PROJECT_NAME + ':index'
    },
    s3: {
      accessKeyId: process.env.AWS_KEY,
      secretAccessKey: process.env.AWS_SECRET,
      bucket: '[REDACTED]',
      region: 'us-west-2',
      prefix: PROJECT_NAME
    },
    slack: {
      webhookURL: "[REDACTED]'',
      username: 'ember-cli-deploy via BOLT',
      iconEmoji: ':zap:'
    }
  };

  ENV["revision-data"] = {
    //filePattern: '**/*.{html,js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}',
    type: 'git-commit'
  };

  if (VALID_DEPLOY_TARGETS.indexOf(deployTarget) === -1) {
    throw new Error('Invalid deployTarget ' + deployTarget);
  }

 if (deployTarget === 'dev') {
    ENV.build.environment = 'development';
    ENV.redis.keyPrefix = PROJECT_NAME + '-dev:index';
    ENV.s3.prefix = PROJECT_NAME + '-dev';
    ENV.plugins = ['build', 'display-revisions', 'gzip', 's3', 'redis', 'revision-data', 'slack']; // everything except manifest since manifest breaks when asset versioning is d$
  }

  if (deployTarget === 'test') {
    ENV.build.environment = 'test';
    ENV.redis.keyPrefix = PROJECT_NAME + '-test:index';
    ENV.s3.prefix = PROJECT_NAME + '-test';
    ENV.plugins = ['build', 'display-revisions', 'gzip', 's3', 'redis', 'revision-data', 'slack']; // everything except manifest since manifest breaks when asset versioning is d$
  }

  if (deployTarget === 'stage') {
    ENV.build.environment = 'staging';
    ENV.redis.keyPrefix = PROJECT_NAME + '-stage:index';
    ENV.s3.prefix = PROJECT_NAME + '-stage';
    ENV.plugins = ['build', 'display-revisions', 'gzip', 's3', 'redis', 'revision-data', 'slack']; // everything except manifest since manifest breaks when asset versioning is d$
  }

  if (deployTarget === 'prod') {
    ENV.build.environment = 'production';
    ENV.redis.keyPrefix = PROJECT_NAME;  // this is the same as we set in the config above (ENV.redis and ENV.s3), just here for clarity
    ENV.s3.prefix = PROJECT_NAME;
  }

  return ENV;
};

...and this package.json

{
  "name": "music-rights-ui",
  "version": "0.0.0",
  "description": "Small description for music-rights-ui goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "basscss": "^6.1.6",
    "basscss-sass": "^1.0.2",
    "broccoli-asset-rev": "^2.2.0",
    "clone": "1.0.2",
    "ember-cli": "^1.13.15",
    "ember-cli-accounting": "1.0.0",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-babel": "^5.1.5",
    "ember-cli-bootstrap-sassy": "0.5.1",
    "ember-cli-coffeescript": "0.11.0",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-datepicker": "2.0.1",
    "ember-cli-dependency-checker": "^1.1.0",
    "ember-cli-deploy": "0.6.0",
    "ember-cli-deploy-lightning-pack": "0.5.0",
    "ember-cli-emblem": "0.3.1",
    "ember-cli-htmlbars": "^1.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-ic-ajax": "0.2.1",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-moment-shim": "0.6.2",
    "ember-cli-pure": "1.0.1",
    "ember-cli-qunit": "^1.0.4",
    "ember-cli-release": "0.2.8",
    "ember-cli-sass": "^4.0.1",
    "ember-cli-selectize": "0.4.2",
    "ember-cli-sri": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "1.13.15",
    "ember-disable-proxy-controllers": "^1.0.1",
    "ember-export-application-global": "^1.0.4",
    "ember-faker": "1.1.0",
    "ember-i18n": "4.2.0",
    "ember-moment": "4.1.0",
    "ember-pikaday": "0.10.0",
    "ember-power-select": "0.8.4",
    "ember-simple-auth": "1.0.1",
    "handlebars-intl": "^1.1.1",
    "torii": "^0.6.1"
  },
  "dependencies": {
    "ember-radio-buttons": "^4.0.1"
  }
}

( note that ember-cli-deploy-slack is missing)

If nothing else, how can we make this error more useful (e.g. Missing Ember CLI Deploy plugin: slack) ? My apologies in advance if this should be opened against ember-cli-deploy directly instead.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.