Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: shipitjs/shipit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.2
Choose a base ref
...
head repository: shipitjs/shipit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 4,754 additions and 3,730 deletions.
  1. +1 −0 .github/FUNDING.yml
  2. +1 −0 .nvmrc
  3. +3 −3 .travis.yml
  4. +78 −0 CHANGELOG.md
  5. +34 −24 README.md
  6. +7 −1 jest.config.js
  7. +1 −1 lerna.json
  8. +16 −15 package.json
  9. +38 −0 packages/shipit-cli/CHANGELOG.md
  10. +24 −0 packages/shipit-cli/README.md
  11. +4 −4 packages/shipit-cli/package.json
  12. +3 −1 packages/shipit-cli/src/Shipit.js
  13. +15 −0 packages/shipit-cli/src/Shipit.test.js
  14. +2 −2 packages/shipit-cli/src/cli.js
  15. +25 −38 packages/shipit-cli/tests/integration.test.js
  16. +60 −0 packages/shipit-deploy/CHANGELOG.md
  17. +73 −43 packages/shipit-deploy/README.md
  18. +6 −6 packages/shipit-deploy/docs/Windows.md
  19. +5 −5 packages/shipit-deploy/package.json
  20. +16 −3 packages/shipit-deploy/src/extendShipit.js
  21. +51 −24 packages/shipit-deploy/src/tasks/deploy/fetch.js
  22. +144 −81 packages/shipit-deploy/src/tasks/deploy/fetch.test.js
  23. +8 −6 packages/shipit-deploy/src/tasks/deploy/update.js
  24. +28 −0 packages/shipit-deploy/src/tasks/deploy/update.test.js
  25. +25 −23 packages/shipit-deploy/tests/integration.test.js
  26. +34 −0 packages/ssh-pool/CHANGELOG.md
  27. +12 −0 packages/ssh-pool/README.md
  28. +2 −2 packages/ssh-pool/package.json
  29. +3 −0 packages/ssh-pool/src/Connection.js
  30. +27 −8 packages/ssh-pool/src/Connection.test.js
  31. +2 −2 packages/ssh-pool/src/ConnectionPool.test.js
  32. +8 −0 packages/ssh-pool/src/commands/cd.js
  33. +6 −3 packages/ssh-pool/src/commands/mkdir.js
  34. +3 −1 packages/ssh-pool/src/commands/raw.js
  35. +2 −2 packages/ssh-pool/src/commands/raw.test.js
  36. +6 −3 packages/ssh-pool/src/commands/rm.js
  37. +2 −0 packages/ssh-pool/src/commands/rsync.js
  38. +18 −5 packages/ssh-pool/src/commands/ssh.js
  39. +8 −2 packages/ssh-pool/src/commands/ssh.test.js
  40. +0 −1 packages/ssh-pool/src/commands/tar.js
  41. +1 −1 packages/ssh-pool/src/commands/tar.test.js
  42. +32 −33 packages/ssh-pool/tests/integration.test.js
  43. BIN resources/shipit-logo-dark.png
  44. BIN resources/shipit-logo-light.png
  45. BIN resources/shipit-logo.png
  46. BIN resources/shipit-logo.sketch
  47. +3,920 −3,387 yarn.lock
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: neoziro
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js

node_js:
- 6
- 8
- 10

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.28.4
@@ -18,8 +18,8 @@ notifications:
cache:
yarn: true
directories:
- ".eslintcache"
- "node_modules"
- '.eslintcache'
- 'node_modules'

addons:
ssh_known_hosts: test.shipitjs.com
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,84 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.3.0](https://github.com/shipitjs/shipit/compare/v5.2.0...v5.3.0) (2020-03-18)


### Features

* add support of `asUser` ([#260](https://github.com/shipitjs/shipit/issues/260)) ([4e79edb](https://github.com/shipitjs/shipit/commit/4e79edb))





# [5.2.0](https://github.com/shipitjs/shipit/compare/v5.1.0...v5.2.0) (2020-03-07)


### Bug Fixes

* **windows:** cd must run the specified drive letter ([#252](https://github.com/shipitjs/shipit/issues/252)) ([ab916a9](https://github.com/shipitjs/shipit/commit/ab916a9))
* fix remote command wont reject on error, when cwd option is used ([#265](https://github.com/shipitjs/shipit/issues/265)) ([986aec1](https://github.com/shipitjs/shipit/commit/986aec1))


### Features

* add a config validation function ([#258](https://github.com/shipitjs/shipit/issues/258)) ([d98ec8e](https://github.com/shipitjs/shipit/commit/d98ec8e))





# [5.1.0](https://github.com/shipitjs/shipit/compare/v5.0.0...v5.1.0) (2019-08-28)


### Bug Fixes

* correct peerDependencies field for shipit-deploy package ([#243](https://github.com/shipitjs/shipit/issues/243)) ([3586c21](https://github.com/shipitjs/shipit/commit/3586c21))


### Features

* **shipit-deploy:** Added config so you can rsync including the folder ([#246](https://github.com/shipitjs/shipit/issues/246)) ([64481f8](https://github.com/shipitjs/shipit/commit/64481f8))
* **ssh-pool:** Added ssh config array to remote server ([#248](https://github.com/shipitjs/shipit/issues/248)) ([ba1d8c2](https://github.com/shipitjs/shipit/commit/ba1d8c2))





# [4.2.0](https://github.com/shipitjs/shipit/compare/v4.1.4...v4.2.0) (2019-03-01)


### Features

* add "init:after_ssh_pool" event ([#230](https://github.com/shipitjs/shipit/issues/230)) ([e864338](https://github.com/shipitjs/shipit/commit/e864338))





## [4.1.4](https://github.com/shipitjs/shipit/compare/v4.1.3...v4.1.4) (2019-02-19)


### Bug Fixes

* **shipit-deploy:** skip fetching git in case when repositoryUrl was not provided (closes [#207](https://github.com/shipitjs/shipit/issues/207)) ([#226](https://github.com/shipitjs/shipit/issues/226)) ([4ae0f89](https://github.com/shipitjs/shipit/commit/4ae0f89))





## [4.1.3](https://github.com/shipitjs/shipit/compare/v4.1.2...v4.1.3) (2018-11-11)


### Bug Fixes

* fixes directory permissions ([#224](https://github.com/shipitjs/shipit/issues/224)) ([3277adf](https://github.com/shipitjs/shipit/commit/3277adf)), closes [#189](https://github.com/shipitjs/shipit/issues/189)





## [4.1.2](https://github.com/shipitjs/shipit/compare/v4.1.1...v4.1.2) (2018-11-04)


58 changes: 34 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/shipitjs/shipit/master/resources/shipit-logo.png" alt="Shipit" title="Shipit" width="500">
<img src="https://raw.githubusercontent.com/shipitjs/shipit/master/resources/shipit-logo-light.png" alt="Shipit" title="Shipit" width="300">
</h1>
<p align="center" style="font-size: 1.2rem;">Universal automation and deployment tool ⛵️</p>

@@ -14,6 +14,7 @@
[![Tweet][twitter-badge]][twitter]

## Install shipit command line tools and shipit-deploy in your project

```
npm install --save-dev shipit-cli
npm install --save-dev shipit-deploy
@@ -25,10 +26,10 @@ Shipit provides a good alternative to Capistrano or other build tools. It is eas

**Features:**

* Write your task using JavaScript
* Task flow based on [orchestrator](https://github.com/orchestrator/orchestrator)
* Login and interactive SSH commands
* Easily extendable
- Write your task using JavaScript
- Task flow based on [orchestrator](https://github.com/orchestrator/orchestrator)
- Login and interactive SSH commands
- Easily extendable

## Deploy using Shipit

@@ -194,12 +195,18 @@ Type: `String` or `Array<String>`

The server can use the shorthand syntax or an object:

* `user@host`: user and host
* `user@host:4000`: user, host and port
* `{ user, host, port }`: an object
- `user@host`: user and host
- `user@host:4000`: user, host and port
- `{ user, host, port, extraSshOptions }`: an object

### Shipit Deploy configuration

#### asUser

Type: `String`

Allows you to ‘become’ another user, different from the user that logged into the machine (remote user).

#### deleteOnRollback

Type: `Boolean`, default to `false`
@@ -331,33 +338,36 @@ shipit.log('hello %s', 'world')

## Dependencies

* [OpenSSH](http://www.openssh.com/) 5+
* [rsync](https://rsync.samba.org/) 3+
- [OpenSSH](http://www.openssh.com/) 5+
- [rsync](https://rsync.samba.org/) 3+

## Known Plugins

### Official

* [shipit-deploy](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy)
- [shipit-deploy](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy)

### Third Party

* [shipit-shared](https://github.com/timkelty/shipit-shared)
* [shipit-db](https://github.com/timkelty/shipit-db)
* [shipit-assets](https://github.com/timkelty/shipit-assets)
* [shipit-ssh](https://github.com/timkelty/shipit-ssh)
* [shipit-utils](https://github.com/timkelty/shipit-utils)
* [shipit-npm](https://github.com/callerc1/shipit-npm)
* [shipit-aws](https://github.com/KrashStudio/shipit-aws)
* [shipit-captain](https://github.com/timkelty/shipit-captain/)
* [shipit-bower](https://github.com/willsteinmetz/shipit-bower)
* [shipit-composer](https://github.com/jeremyzahner/shipit-composer)
- [shipit-shared](https://github.com/timkelty/shipit-shared)
- [shipit-db](https://github.com/timkelty/shipit-db)
- [shipit-assets](https://github.com/timkelty/shipit-assets)
- [shipit-ssh](https://github.com/timkelty/shipit-ssh)
- [shipit-utils](https://github.com/timkelty/shipit-utils)
- [shipit-npm](https://github.com/callerc1/shipit-npm)
- [shipit-aws](https://github.com/KrashStudio/shipit-aws)
- [shipit-captain](https://github.com/timkelty/shipit-captain/)
- [shipit-bower](https://github.com/willsteinmetz/shipit-bower)
- [shipit-composer](https://github.com/jeremyzahner/shipit-composer)
- [shipit-bastion](https://github.com/BrokerageEngine/shipit-bastion)
- [shipit-yaml](https://github.com/davidbernal/shipit-yaml)
- [shipit-conditional](https://github.com/BrokerageEngine/shipit-conditional)

## Who use Shipit?

* [Le Monde](http://www.lemonde.fr)
* [Ghost blogging platform](https://ghost.org/)
* [Fusionary](http://fusionary.com)
- [Le Monde](http://www.lemonde.fr)
- [Ghost blogging platform](https://ghost.org/)
- [Fusionary](http://fusionary.com)

## License

8 changes: 7 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
process.env.FORCE_COLOR=0;

module.exports = {
testEnvironment: 'node',
roots: ['packages'],
coverageDirectory: './coverage/'
coverageDirectory: './coverage/',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "3.4.3",
"npmClient": "yarn",
"version": "4.1.2",
"version": "5.3.0",
"useWorkspaces": true
}
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"license": "MIT",
"private": true,
"scripts": {
"postinstall": "chmod 400 ./ssh/id_rsa ./ssh/id_rsa.pub",
"build": "lerna run build",
"ci": "yarn build && yarn lint && yarn test --ci --coverage && codecov",
"dev": "lerna run build --parallel -- --watch",
@@ -11,29 +12,29 @@
"test": "jest --runInBand"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/node": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-core": "^7.0.0-0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-preset-env": "^1.7.0",
"chalk": "^2.4.1",
"codecov": "^3.1.0",
"eslint": "^5.8.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-import": "^2.14.0",
"conventional-github-releaser": "^3.1.2",
"eslint": "^6.2.2",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-import": "^2.18.2",
"glob": "^7.1.3",
"jest": "^23.6.0",
"lerna": "^3.4.3",
"micromatch": "^3.1.9",
"jest": "^24.9.0",
"jest-watch-typeahead": "^0.4.0",
"lerna": "^3.16.4",
"mkdirp": "^0.5.1",
"mock-utf8-stream": "^0.1.1",
"prettier": "^1.14.3",
"std-mocks": "^1.0.1",
"string-length": "^2.0.0"
"std-mocks": "^1.0.1"
},
"workspaces": [
"packages/*"
38 changes: 38 additions & 0 deletions packages/shipit-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.3.0](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/compare/v5.2.0...v5.3.0) (2020-03-18)


### Features

* add support of `asUser` ([#260](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/issues/260)) ([4e79edb](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/commit/4e79edb))





# [5.2.0](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/compare/v5.1.0...v5.2.0) (2020-03-07)

**Note:** Version bump only for package shipit-cli





# [5.1.0](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/compare/v5.0.0...v5.1.0) (2019-08-28)

**Note:** Version bump only for package shipit-cli





# [4.2.0](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/compare/v4.1.4...v4.2.0) (2019-03-01)


### Features

* add "init:after_ssh_pool" event ([#230](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/issues/230)) ([e864338](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/commit/e864338))





## [4.1.2](https://github.com/shipitjs/shipit/tree/master/packages/shipit-deploy/compare/v4.1.1...v4.1.2) (2018-11-04)

**Note:** Version bump only for package shipit-cli
24 changes: 24 additions & 0 deletions packages/shipit-cli/README.md
Original file line number Diff line number Diff line change
@@ -128,6 +128,30 @@ Log using Shipit, same API as `console.log`.
shipit.log('hello %s', 'world')
```

## Workflow tasks

When the system initializes it automatically emits events:

- Emit event "init"
- Emit event "init:after_ssh_pool"

Each shipit task also generates events:

- Emit event "task_start"
- Emit event "task_stop"
- Emit event "task_err"
- Emit event "task_not_found"

Inside the task events, you can test for the task name.

```js
shipit.on('task_start', event => {
if (event.task == 'first_task') {
shipit.log("I'm the first task")
}
})
```

## License

MIT
8 changes: 4 additions & 4 deletions packages/shipit-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shipit-cli",
"version": "4.1.2",
"version": "5.3.0",
"description": "Universal automation and deployment tool written in JavaScript.",
"engines": {
"node": ">=6"
@@ -26,12 +26,12 @@
},
"dependencies": {
"chalk": "^2.4.1",
"commander": "^2.15.0",
"commander": "^3.0.0",
"interpret": "^1.1.0",
"liftoff": "^2.5.0",
"liftoff": "^3.1.0",
"orchestrator": "^0.3.7",
"pretty-hrtime": "^1.0.0",
"ssh-pool": "^4.1.2",
"ssh-pool": "^5.3.0",
"stream-line-wrapper": "^0.1.1",
"v8flags": "^3.1.0"
}
Loading