date | title | author | tags | repo | logo | image | ||
---|---|---|---|---|---|---|---|---|
2018-01-24 00:00:00 +0000 |
Now |
lucaperret |
|
lucaperret/drone-now |
now.svg |
lucap/drone-now |
The Now plugin deploy your build to now.sh.
The below pipeline configuration demonstrates simple usage:
Note: deploy_name
is an optional parameter. If it is not given now.sh will use name of the working directory .
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
now_token: keep-this-secret
Or use the secret NOW_TOKEN instead, if you supply both the plugin will use the now_token
parameter first
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
- now_token: keep-this-secret
+ secrets: [ now_token ]
Set the directory you want to deploy. See the Deployment Documentation for more info.
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
+ directory: public
Example configuration with team scope:
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- directory: public
+ team: myteam
Example configuration to enforce type (by default, it's detected automatically):
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- team: myteam
+ type: npm
Example configuration for assigning Aliases and Domains:
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- type: npm
+ alias: my-deployment-alias
Example configuration for Cleaning Up Old Deployments:
Note: You must set the alias
parameter with cleanup
.
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
+ alias: my-deployment-alias
+ cleanup: true
Example configuration with custom Path Aliases:
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- alias: my-deployment-alias
- cleanup: true
+ rules_domain: example.com
+ rules_file: rules.json
Example configuration for Scaling:
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- rules_domain: example.com
- rules_file: rules.json
+ scale: 2
now_token : Now token
now_token : Your API token (can also be set implicitly with a secret named NOW_TOKEN)
deploy_name : Set the name of the deployment
directory : The directory you want to deploy
team : Set the team scope
type : Deployment type (docker, npm, static)
alias : Target now.sh subdomain or domain
cleanup
: Equivalent to now rm --safe --yes $alias
rules_domain : Your domain
rules_file : File that contain set of rules
scale : Min and Max scaling values