
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
shipit-deploy
Advanced tools
Set of deployment tasks for Shipit.
Features:
npm install shipit-deploy
If you are deploying from Windows, you may want to have a look at the wiki page about usage in Windows.
shipitfile.js
module.exports = shipit => {
require('shipit-deploy')(shipit)
shipit.initConfig({
default: {
workspace: '/tmp/myapp',
deployTo: '/var/myapp',
repositoryUrl: 'https://github.com/user/myapp.git',
ignores: ['.git', 'node_modules'],
keepReleases: 2,
keepWorkspace: false, // should we remove workspace dir after deploy?
deleteOnRollback: false,
key: '/path/to/key',
shallowClone: true,
deploy: {
remoteCopy: {
copyAsDir: false, // Should we copy as the dir (true) or the content of the dir (false)
},
},
},
staging: {
servers: 'user@myserver.com',
},
})
}
To deploy on staging, you must use the following command :
shipit staging deploy
You can rollback to the previous releases with the command :
shipit staging rollback
Type: String
Define a path to a directory where Shipit builds it's syncing source.
Beware to not set this path to the root of your repository (unless you are set
keepWorkspace: true
) as shipit-deploy cleans the directory at the given path after successful deploy.
Here you have the following setup possibilities:
keepWorkspace: true
so that your workspace dir won't be removed after deployrsyncFrom
if you want to sync e.g. only ./build
dirbranch
so that we can get correct revision hashshallowClone: true
— this will speed up repo fetch speed and create a temporary workspace. NOTE: if you decide not to use shallowClone
, you should set workspace
path manually. If you set shallowClone: true
, then the temporary workspace directory will be removed after deploy (unless you set keepWorkspace: true
)repositoryUrl
and optionally branch
and gitConfig
Type: Boolean
If true
— we won't remove workspace dir after deploy.
Type: String
Default: same as workspace
Define directory within the workspace which should be deployed.
Type: String
Define the remote path where the project will be deployed. A directory releases
is automatically created. A symlink current
is linked to the current release.
Type: String
Git URL of the project repository.
If empty Shipit will try to deploy without pulling the changes.
In edge cases like quick PoC projects without a repository or a living on the edge production patch applying this can be helpful.
Type: String
Tag, branch or commit to deploy.
Type: Array<String>
An array of paths that match ignored files. These paths are used in the rsync command.
Type: Boolean
Whether or not to delete the old release when rolling back to a previous release.
Type: String
Path to SSH key
Type: Number
Number of releases to keep on the remote server.
Type: Boolean
Perform a shallow clone. Default: false
.
Type: Boolean
Update submodules. Default: false
.
type: Object
Custom git configuration settings for the cloned repo.
Type: String
Log format to pass to git log
. Used to display revision diffs in pending
task. Default: %h: %s - %an
.
Type: String
Optional
When deploying from Windows, prepend the workspace path with the drive letter. For example /d/tmp/workspace
if your workspace is located in d:\tmp\workspace
.
By default, it will run rsync from the workspace folder.
Type: String
Parameter to pass to cp
to copy the previous release. Non NTFS filesystems support -r
. Default: -a
Type: Boolean
Optional
If true
- We will copy the folder instead of the content of the folder. Default: false
.
Several variables are attached during the deploy and the rollback process:
All options described in the config sections are available in the shipit.config
object.
Attached during deploy:fetch
task.
You can manipulate the repository using git command, the API is describe in gift.
Attached during deploy:update
and rollback:init
task.
The current release dirname of the project, the format used is "YYYYMMDDHHmmss" (moment format).
Attached during deploy:init
, rollback:init
, and pending:log
tasks.
The remote releases path.
Attached during deploy:update
and rollback:init
task.
The complete release path : path.join(shipit.releasesPath, shipit.releaseDirname)
.
Attached during deploy:init
, rollback:init
, and pending:log
tasks.
The current symlink path : path.join(shipit.config.deployTo, 'current')
.
MIT
FAQs
Official set of deploy tasks for Shipit.
The npm package shipit-deploy receives a total of 6,260 weekly downloads. As such, shipit-deploy popularity was classified as popular.
We found that shipit-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.