47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
|
# Cockpit CMS Drone Deploys Addon
|
||
|
|
||
|
This addons is a modified version of the addon [CockpitCMS-Netlify](https://github.com/pauloamgomes/CockpitCMS-Netlify).
|
||
|
|
||
|
It provides an integration with Drone CI promote feature to trigger a pipeline run. You can use it to deploy a website based on data in Cockpit CMS and built with a static site generator.
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
1. Confirm that you have Cockpit CMS (Next branch) installed and working.
|
||
|
2. Download and extract to 'your-cockpit-docroot/addons' (e.g. cockpitcms/addons/Drone, the addon folder name must be Drone)
|
||
|
3. Drone icon will apear, if configuration is completed.
|
||
|
|
||
|
## Configuration
|
||
|
|
||
|
1. Ensure that from your Drone account you have an access token and permissions to promote a build for the project and branch, you want to use.
|
||
|
2. Edit Cockpit config/config.yaml and add a new entry for drone like below:
|
||
|
|
||
|
```yaml
|
||
|
drone:
|
||
|
url: https://drone.yourserver.de
|
||
|
token: <your drone access token>
|
||
|
owner: <the owner of the git repository>
|
||
|
project: <the git project>
|
||
|
branch: <the branch in your git repository for the deployment>
|
||
|
environment: <the environment used in your drone pipeline>
|
||
|
build: <the build number used as base for deployment> # leave empty and the addon will use the latest successfull build based on a push event
|
||
|
|
||
|
```
|
||
|
|
||
|
### Permissions
|
||
|
|
||
|
There are just two permissions:
|
||
|
|
||
|
- **manage.view** - provides access to the Drone deploy list
|
||
|
- **manage.deploy** - provides access to trigger a new deploy
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
Having the configuration defined accessing the Drone deploys page (/drone/deploys) a list of latest (limited to 50) deploys is displayed:
|
||
|
|
||
|
To trigger a new deploy just hist the Deploy button an confirm the action.
|
||
|
|
||
|
## Copyright and license
|
||
|
|
||
|
Copyright 2019 Sebastian Frank under the MIT license.
|
||
|
|