Skip to content
This repository was archived by the owner on Mar 23, 2022. It is now read-only.
This repository was archived by the owner on Mar 23, 2022. It is now read-only.

Provide runtime mechanism to inject the webhooks url into stackbutton #7

Description

@swcurran

The webhook URL for service notifications currently comes from the config/local.js file that is not part of the repo. As a result, auto-generating a docker image from the stackbutton github repo does not have the webhooks URL - the config/local.js is not part of the resulting docker image. On adding a service to stackbutton, a fatal error results from not having the webhooks URL, terminating the service with the following error below.

Add a mechanism that gets the webhooks URL ideally at runtime, or at least injected at server startup - perhaps by an Environment variable.

dev_1 | url: sails.config.url.hooks + "/payload/" + module.project,
dev_1 | ^
dev_1 |
dev_1 | TypeError: Cannot read property 'hooks' of undefined
dev_1 | at /app/api/services/GithubService.js:66:32
dev_1 | at wrapper (/app/node_modules/sails/node_modules/lodash/index.js:3592:19)
dev_1 | at applyInOriginalCtx (/app/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:421:80)
dev_1 | at wrappedCallback (/app/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:324:18)
dev_1 | at callback.success (/app/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
dev_1 | at _switch (/app/node_modules/sails/node_modules/waterline/node_modules/switchback/lib/factory.js:58:28)
dev_1 | at returnResults (/app/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:180:9)
dev_1 | at /app/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:86:16
dev_1 | at /app/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:83:7
dev_1 | at /app/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:52:16
dev_1 | at Object.async.forEachOf.async.eachOf (/app/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:236:30)
dev_1 | at Object.async.forEach.async.each (/app/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:209:22)
dev_1 | at /app/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:436:11
dev_1 | at /app/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:574:5
dev_1 | at /app/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:52:16
dev_1 | at Object.async.forEachOf.async.eachOf (/app/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:236:30)
sbhub_dev_1 exited with code 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions