mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #4283 from dokku/4151-ci-docs
Add CI documentation section for Github Actions and Gitlab
This commit is contained in:
25
docs/deployment/continuous-integration/generic.md
Normal file
25
docs/deployment/continuous-integration/generic.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generic CI/CD Integration
|
||||
|
||||
In cases where there is no direct or documented integration available, the Dokku project provides an [Official Docker Image](https://github.com/dokku/ci-docker-image) for use in Continuous Integration/Continuous Deployment (CI/CD) systems.
|
||||
|
||||
Assuming a Docker image can be run as a CI task with environment variables injected, the following CI systems will have their variables automatically detected:
|
||||
|
||||
- [circleci](https://circleci.com/)
|
||||
- [cloudbees](https://www.cloudbees.com/)
|
||||
- [drone](https://www.drone.io/)
|
||||
- [github actions](https://github.com/features/actions)
|
||||
- [gitlab-ci](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/)
|
||||
- [semaphoreci](https://semaphoreci.com/)
|
||||
- [travisci](https://travis-ci.com/)
|
||||
|
||||
## Simple Usage
|
||||
|
||||
The simplest usage of the image is as follows.
|
||||
|
||||
```shell
|
||||
# where the `.env` file contains `GIT_REMOTE_URL` and `SSH_PRIVATE_KEY`
|
||||
|
||||
docker run --rm -v="$PWD:/app" --env-file=.env dokku/ci-docker-image dokku-deploy
|
||||
```
|
||||
|
||||
For more configuration examples and further documentation, see the [ci-docker-image](https://github.com/dokku/ci-docker-image) readme.
|
||||
31
docs/deployment/continuous-integration/github-actions.md
Normal file
31
docs/deployment/continuous-integration/github-actions.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Github Actions
|
||||
|
||||
The Dokku project has an official Githb Action available on the [Github Marketplace](https://github.com/marketplace/actions/dokku). The simplest usage example is as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: 'deploy'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to dokku
|
||||
uses: dokku/github-action@v1
|
||||
with:
|
||||
git_remote_url: 'ssh://dokku@dokku.me:22/appname'
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
```
|
||||
|
||||
|
||||
For further usage documentation and other advanced examples, see the entry on the [Github Marketplace](https://github.com/marketplace/actions/dokku).
|
||||
@@ -1,4 +1,4 @@
|
||||
# Deploying with Gitlab CI
|
||||
# Gitlab CI
|
||||
|
||||
Gitlab-CI can be used to automatically deploy a Dokku application using the [ilyasemenov/gitlab-ci-git-push image](https://github.com/IlyaSemenov/gitlab-ci-git-push) docker image.
|
||||
|
||||
@@ -175,6 +175,11 @@
|
||||
<a href="/{{NAME}}/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/{{NAME}}/development/release-process/" class="list-group-item">Release Process</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Continuous Integration</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/github-actions/" class="list-group-item">Github Actions</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/gitlab-ci/" class="list-group-item">Gitlab CI</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/generic/" class="list-group-item">Generic</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
<a href="/{{NAME}}/community/clients/" class="list-group-item">Clients</a>
|
||||
<a href="/{{NAME}}/community/plugins/" class="list-group-item">Plugins</a>
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
|
||||
"community/tutorials/deploying-with-gitlab-ci": "deployment/continuous-integration/gitlab-ci/",
|
||||
|
||||
"plugins": "community/plugins/"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user