Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c757e2d
Master - Develop merge (#520)
Railag Jan 28, 2019
ce550a3
Issues with update/delete system microservices CLI and API (#521)
dbusel Jan 28, 2019
1aeda09
feat(tracking): add tracking for some events (ENG-429)
mchepelev Jan 30, 2019
fc50e29
feat(core) added seed with catalog item for logging microservice (ENG…
Railag Jan 30, 2019
7705e17
bug(fix): improve validation for parameters with type "number" (ENG-5…
alexandershpak Feb 4, 2019
52a49eb
feat(tracking): add tracking for some events (#527)
mchepelev Feb 4, 2019
f76a270
Add Ian's improvements: integration for slack (#522)
dbusel Feb 5, 2019
10e0d60
feat(microservices): allow to delete system microservies via cli (#528)
mchepelev Feb 5, 2019
e1cd766
feat(tracking): create temp db for tests (#524)
mchepelev Feb 5, 2019
eac8708
feat(catalog): allow update catalog item image without regular fields…
mchepelev Feb 6, 2019
7bbb26d
Maksimchepelev/fetaure cli validation ENG-546 (#530)
mchepelev Feb 7, 2019
5008f80
Maksimchepelev/bugs (#532)
mchepelev Feb 7, 2019
d2abfba
Release 1.0.36 (#535)
dbusel Feb 7, 2019
a770eeb
Dev and release packages feature (#536)
dbusel Feb 12, 2019
c44bbcf
add branch restriction to deploy section
dbusel Feb 12, 2019
81bca7b
skip npm test on deploy stage
dbusel Feb 12, 2019
46d645f
test upload to edgeworx site
dbusel Feb 12, 2019
b60a083
test parallel deploy
dbusel Feb 12, 2019
4f6d606
Update .travis.yml
dbusel Feb 12, 2019
127d2eb
Update .travis.yml
dbusel Feb 12, 2019
c38f420
Update .travis.yml
dbusel Feb 12, 2019
4b9be1f
Just adding badges to the ReadMe,just to give some more insight to so…
Xaoc000 Feb 12, 2019
054e772
Merge pull request #537 from Xaoc000/SmallTravisImprovement
Xaoc000 Feb 12, 2019
2eff3a6
[skip ci] update travis.yml
dbusel Feb 13, 2019
50efdd6
Maksimchepelev/fetature logging eng 557 (#539)
mchepelev Feb 15, 2019
d375f0a
adding agentsCount to tracking and fixing UUID generation bug (#540)
baghbidi Feb 18, 2019
8afe223
logging eng 557 (#544)
mchepelev Feb 18, 2019
2b3d25f
Maksimchepelev/feature cli help for command eng 556 (#541)
mchepelev Feb 18, 2019
5bc4be2
feat(core) default configs for microservices progress (ENG-196) (#545)
Railag Feb 19, 2019
370b28d
add fix to prerelease (#550)
dbusel Feb 20, 2019
ffa8519
[skip ci]
dbusel Feb 20, 2019
b71211a
Update .travis.yml
dbusel Feb 20, 2019
73224a3
Update .gitignore
dbusel Feb 20, 2019
692044e
Update .travis.yml
dbusel Feb 20, 2019
9d2742a
Update package.json
dbusel Feb 20, 2019
d392c33
[skip ci]
dbusel Feb 20, 2019
553ab0f
[skip ci]
dbusel Feb 20, 2019
074f08d
Update package.json
dbusel Feb 20, 2019
ec41d55
Update package.json
dbusel Feb 20, 2019
b2c8262
[skip ci] fix deploy to preprod env
dbusel Feb 21, 2019
4dcec2b
Update package.json
dbusel Feb 25, 2019
f2cb330
Fixing registries with private repos (#563)
Railag Feb 25, 2019
d6d4360
Hide passwords fix (#565)
Railag Feb 27, 2019
2a50b7a
update version
dbusel Feb 27, 2019
80cf69d
Merge remote-tracking branch 'origin/master' into release-1.0.37
Railag Mar 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
225 changes: 14 additions & 211 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,220 +6,23 @@ module.exports = {
'node': true,
},

'ecmaFeatures': {
'modules': true
'extends': 'google',
'rules': {
'require-jsdoc': [OFF, {
'require': {
'FunctionDeclaration': true,
'MethodDefinition': true,
'ClassDeclaration': false
}
}],
'max-len': [WARN, 132],
'no-invalid-this': OFF,
'no-multi-str': OFF,
'semi': [ERROR, 'never'],
},

'parserOptions': {
'sourceType': 'module',
'ecmaVersion': 6,
'ecmaFeatures': {
'jsx': true,
'experimentalObjectRestSpread': true
},

'extends': 'eslint:recommended',

'rules': {
// Possible Errors (overrides from recommended set)
'no-extra-parens': ERROR,
'no-unexpected-multiline': ERROR,
// All JSDoc comments must be valid
'valid-jsdoc': [ERROR, {
'requireReturn': false,
'requireReturnDescription': false,
'requireParamDescription': true,
'prefer': {
'return': 'returns'
}
}],

// Best Practices

// Allowed a getter without setter, but all setters require getters
'accessor-pairs': [ERROR, {
'getWithoutSet': false,
'setWithoutGet': true
}],
'block-scoped-var': WARN,
'consistent-return': ERROR,
'curly': ERROR,
'default-case': WARN,
// the dot goes with the property when doing multiline
'dot-location': [WARN, 'property'],
'dot-notation': WARN,
'eqeqeq': [ERROR, 'smart'],
'guard-for-in': WARN,
'no-alert': ERROR,
'no-caller': ERROR,
'no-case-declarations': WARN,
'no-div-regex': WARN,
'no-else-return': WARN,
'no-labels': WARN,
'no-empty-pattern': WARN,
'no-eq-null': WARN,
'no-eval': ERROR,
'no-extend-native': ERROR,
'no-extra-bind': WARN,
'no-floating-decimal': WARN,
'no-implicit-coercion': [WARN, {
'boolean': true,
'number': true,
'string': true
}],
'no-implied-eval': ERROR,
'no-invalid-this': ERROR,
'no-iterator': ERROR,
'no-lone-blocks': WARN,
'no-loop-func': ERROR,
'no-magic-numbers': WARN,
'no-multi-spaces': ERROR,
'no-multi-str': WARN,
'no-native-reassign': ERROR,
'no-new-func': ERROR,
'no-new-wrappers': ERROR,
'no-new': ERROR,
'no-octal-escape': ERROR,
'no-param-reassign': ERROR,
'no-process-env': OFF,
'no-proto': ERROR,
'no-redeclare': ERROR,
'no-return-assign': ERROR,
'no-script-url': ERROR,
'no-self-compare': ERROR,
'no-throw-literal': ERROR,
'no-unused-expressions': ERROR,
'no-useless-call': ERROR,
'no-useless-concat': ERROR,
'no-void': WARN,
// Produce warnings when something is commented as TODO or FIXME
'no-warning-comments': [WARN, {
'terms': ['TODO', 'FIXME'],
'location': 'start'
}],
'no-with': WARN,
'radix': WARN,
'vars-on-top': ERROR,
// Enforces the style of wrapped functions
'wrap-iife': [ERROR, 'outside'],
'yoda': ERROR,

// Strict Mode - for ES6, never use strict.
'strict': [WARN, 'never'],

// Variables
'init-declarations': [ERROR, 'always'],
'no-catch-shadow': WARN,
'no-delete-var': ERROR,
'no-label-var': ERROR,
'no-shadow-restricted-names': ERROR,
'no-shadow': WARN,
// We require all vars to be initialized (see init-declarations)
// If we NEED a var to be initialized to undefined, it needs to be explicit
'no-undef-init': OFF,
'no-undef': ERROR,
'no-undefined': OFF,
'no-unused-vars': WARN,
// Disallow hoisting - let & const don't allow hoisting anyhow
'no-use-before-define': ERROR,

// Node.js and CommonJS
'callback-return': [WARN, ['callback', 'next']],
'global-require': OFF,
'handle-callback-err': WARN,
'no-mixed-requires': WARN,
'no-new-require': ERROR,
// Use path.concat instead
'no-path-concat': ERROR,
'no-process-exit': ERROR,
'no-restricted-modules': OFF,
'no-sync': WARN,

// ECMAScript 6 support
'arrow-body-style': [ERROR, 'always'],
'arrow-parens': [ERROR, 'always'],
'arrow-spacing': [ERROR, {'before': true, 'after': true}],
'constructor-super': ERROR,
'generator-star-spacing': [ERROR, 'before'],
'no-confusing-arrow': ERROR,
'no-class-assign': ERROR,
'no-const-assign': ERROR,
'no-dupe-class-members': ERROR,
'no-this-before-super': ERROR,
'no-var': WARN,
'object-shorthand': [WARN, 'never'],
'prefer-arrow-callback': WARN,
'prefer-spread': WARN,
'prefer-template': WARN,
'require-yield': ERROR,

// Stylistic - everything here is a warning because of style.
'array-bracket-spacing': [WARN, 'always'],
'block-spacing': [WARN, 'always'],
'brace-style': [WARN, '1tbs', {'allowSingleLine': false}],
'camelcase': WARN,
'comma-spacing': [WARN, {'before': false, 'after': true}],
'comma-style': [WARN, 'last'],
'computed-property-spacing': [WARN, 'never'],
'consistent-this': [WARN, 'self'],
'eol-last': WARN,
'func-names': WARN,
'func-style': [WARN, 'declaration'],
'id-length': [WARN, {'min': 1, 'max': 32}],
'indent': [WARN, 2],
'jsx-quotes': [WARN, 'prefer-double'],
'linebreak-style': [WARN, 'unix'],
'lines-around-comment': [WARN, {'beforeBlockComment': true}],
'max-depth': [WARN, 8],
'max-len': [WARN, 132],
'max-nested-callbacks': [WARN, 8],
'max-params': [WARN, 8],
'new-cap': WARN,
'new-parens': WARN,
'no-array-constructor': WARN,
'no-bitwise': OFF,
'no-continue': OFF,
'no-inline-comments': OFF,
'no-lonely-if': WARN,
'no-mixed-spaces-and-tabs': ERROR,
'no-multiple-empty-lines': WARN,
'no-negated-condition': OFF,
'no-nested-ternary': WARN,
'no-new-object': WARN,
'no-plusplus': OFF,
'no-spaced-func': WARN,
'no-ternary': OFF,
'no-trailing-spaces': WARN,
'no-underscore-dangle': WARN,
'no-unneeded-ternary': WARN,
'object-curly-spacing': [WARN, 'always'],
'one-var': OFF,
'operator-assignment': [WARN, 'never'],
'operator-linebreak': [WARN, 'after'],
'padded-blocks': [WARN, 'never'],
'quote-props': [WARN, 'consistent-as-needed'],
'quotes': [WARN, 'single'],
'require-jsdoc': [OFF, {
'require': {
'FunctionDeclaration': true,
'MethodDefinition': true,
'ClassDeclaration': false
}
}],
'semi-spacing': [WARN, {'before': false, 'after': true}],
'semi': [ERROR, 'never'],
'sort-vars': OFF,
'keyword-spacing': [WARN, {
'before': true,
'after': true,
}],
'space-before-blocks': [WARN, 'always'],
'space-before-function-paren': [WARN, 'never'],
'space-in-parens': [WARN, 'never'],
'space-infix-ops': [WARN, {'int32Hint': true}],
'space-unary-ops': ERROR,
'spaced-comment': [WARN, 'always'],
'wrap-regex': WARN
}
'ecmaVersion': 2017,
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ node_modules
.vscode
*.sqlite
.nyc_output
package-lock.json
75 changes: 46 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,70 @@ notifications:
template:
- "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository_slug}@%{branch} in PR <%{pull_request_url}|#%{pull_request_number}> by %{author} %{result} in %{duration}"
stages:
- name: build
if: type = pull_request
- name: test
if: branch =~ /^release-.*$/ OR branch IN (develop, master)
- name: dev_deploy
if: branch = develop AND type = push
- name: pre_release
- name: pre_release_deploy
if: branch =~ /^release-.*$/ AND type = push
- name: release
- name: release_deploy
if: branch = master and type = push

jobs:
include:
- stage: build
script:
- npm test
- npm run postman_test
include:
- script: "npm test"
- script: "npm run postman_test"
- stage: dev_deploy
before_install:
- sudo apt-get install sshpass
script:
script: skip
before_deploy:
- npm pack
#- export VERSION=`npm view iofogcontroller version`
deploy:
skip_cleanup: true
provider: script
script:
- sshpass -p $EDGEWORX_PASSWORD scp -o StrictHostKeyChecking=no iofogcontroller-*.tgz
$EDGEWORX_USERNAME@$EDGEWORX_IP:/var/www/vhosts/edgeworx.io/downloads/builds/iofogcontroller.tgz
on:
branch: develop
after_deploy:
- sshpass -p $DEV_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP
"cd /FogController; NODE_ENV=production node src/main.js stop; git pull; npm
i; npm test; npm run postman_test; NODE_ENV=production node src/main.js start;"
- stage: pre_release
"iofog-controller stop; rm -f /iofogcontroller/*"
- sshpass -p $DEV_MACHINE_PASSWORD scp -o StrictHostKeyChecking=no iofogcontroller-*.tgz
$DEV_MACHINE_USERNAME@$DEV_MACHINE_IP:/iofogcontroller
- sshpass -p $DEV_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP
"npm i --unsafe-perm -g /iofogcontroller/iofogcontroller-*.tgz; iofog-controller start"
- stage: pre_release_deploy
before_install:
- sudo apt-get install sshpass
script:
script: skip
#- npm version prerelease --preid=prerelease -m "upgrade to %s for prerelease package"
deploy:
skip_cleanup: true
provider: npm
email: "${NPM_EMAIL_ADDRESS}"
api_key: "${NPM_AUTH_TOKEN}"
tag: dev
on:
all_branches: true
after_deploy:
- sshpass -p $PREPROD_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $PREPROD_MACHINE_USERNAME@$PREPROD_MACHINE_IP
"cd /Controller; NODE_ENV=production node src/main.js stop; git checkout $TRAVIS_BRANCH; npm i;
npm test; npm run postman_test; NODE_ENV=production node src/main.js start;"
- stage: release
#before_install:
#- git clone "https://github.com/$TRAVIS_REPO_SLUG.git" "$TRAVIS_REPO_SLUG";
#- cd "$TRAVIS_REPO_SLUG";
#- git checkout -qf "$TRAVIS_COMMIT";
#- git checkout master
#before_deploy:
#- git config --global user.name "${GH_USERNAME}";
#- git config credential.helper "store --file=.git/credentials";
#- echo "https://${GH_TOKEN}:@github.com" > .git/credentials;
#- npm run automatic-release
"iofog-controller stop; npm i --unsafe-perm -g iofogcontroller@dev; iofog-controller start"
- stage: release_deploy
before_install:
- sudo apt-get install sshpass
script: skip
#- npm version patch -m "upgrade to %s for release"
deploy:
skip_cleanup: true
provider: npm
email: "${NPM_EMAIL_ADDRESS}"
api_key: "${NPM_AUTH_TOKEN}"
tag: latest
on:
tags: false
branch: master
after_deploy:
- sshpass -p $PROD_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $PROD_MACHINE_USERNAME@$PROD_MACHINE_IP
"iofog-controller stop; npm update -g iofogcontroller; iofog-controller start"
"iofog-controller stop; npm update --unsafe-perm -g iofogcontroller; iofog-controller start"
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# ioFog Controller

### Status

![](https://img.shields.io/github/release/iofog/connector.svg?style=flat)
[![Build Status](https://travis-ci.org/ioFog/Connector.svg)](https://travis-ci.org/ioFog/Connector)

![](https://img.shields.io/github/repo-size/iofog/connector.svg?style=flat)
![](https://img.shields.io/github/last-commit/iofog/connector.svg?style=flat)
![](https://img.shields.io/github/contributors/iofog/connector.svg?style=flat)
![](https://img.shields.io/github/issues/iofog/connector.svg?style=flat)

![Supports amd64 Architecture][amd64-shield]
![Supports aarch64 Architecture][arm64-shield]
![Supports armhf Architecture][arm-shield]

[arm64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[arm-shield]: https://img.shields.io/badge/armhf-yes-green.svg
## Install

```
Expand Down
Loading