You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
5 years ago
|
# drone-caprover-deploy
|
||
|
|
||
|
Drone plugin to deploy to a caprover app using a tar of the required files.
|
||
|
|
||
|
**Note**: You must have a captain-definition file present in the root of your repository.
|
||
|
|
||
|
## Configuration
|
||
|
|
||
|
A sample configuration which includes all settings will look like this
|
||
|
|
||
|
```yaml
|
||
|
{
|
||
|
name: "deploy",
|
||
|
image: "drone-caprover-deploy",
|
||
|
settings: {
|
||
|
app_name: "core", # Required: Caprover application name
|
||
|
password: { # Required: Caprover root password
|
||
|
from_secret: "cap_password"
|
||
|
},
|
||
|
host: { # Required: Caprover url
|
||
|
from_secret: "cap_url"
|
||
|
},
|
||
|
tar_include: [ # Optional: Items to include in the tar file. Will zip the entire repo if not specified.
|
||
|
"file1",
|
||
|
"file2"
|
||
|
],
|
||
|
suffixes: { # Optional: If provided, when the current branch for the job matches some "branch_name" key, the "suffix field" will be appended to the "app_name" value. This is useful if you want to condense your repo deploys into a single CI step.
|
||
|
"branch_name": "suffix field",
|
||
|
"develop": "-staging",
|
||
|
...
|
||
|
},
|
||
|
},
|
||
|
when: {
|
||
|
status: [
|
||
|
"success"
|
||
|
],
|
||
|
...
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
What the above example will do:
|
||
|
|
||
|
- Build a tar file which contains 'file1' and 'file2'
|
||
|
- Once built, will deploy to the host specified in the 'cap_url' secret using the 'cap_password' secret.
|
||
|
- When running on branch 'develop' it will deploy to the 'core-staging' application.
|