Now

by lucaperret

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

Secret Reference

now_token
Now token

Parameter Reference

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

¿Hay algún error en esta página? Por favor, háganoslo saber o edite esta página.