Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/ddev-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ An rsync-based provider for pulling a DB dump from a host called "Tibus", run in
- `auth_command` checks `ssh-add -l` succeeds, erroring with instructions to run `ddev auth ssh` first if not.
- `db_pull_command` (`service: web`) runs `rsync -az -e "ssh -J ${AEGIR_USERNAME}@anrt.vpn" "${dburl}" /var/www/html/.ddev/.downloads/db.sql.gz`, tunneling through an Aegir jump host.

## gitlab.yaml (GitLab CI artifact provider)

Pulls a database dump published as a GitLab CI job artifact, using the `glab` CLI.

- Defines only `db_pull_command` (`service: host`).
- Runs `glab ci artifact dev db:artifact --path=".ddev/.downloads"` to download the artifact, then `ddev import-db --file=.ddev/.downloads/db.sql.gz` to import it.
- Used via `ddev pull gitlab --skip-files` (the file header also notes `ddev remote-db` as an entry point).

## Selecting the active provider

The active provider name is stored as `DDEV_UPSTREAM_PROVIDER` in `.ddev/.env.anner` (read via `ddev dotenv`):
Expand Down
16 changes: 16 additions & 0 deletions scripts/provider-samples/gitlab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Gitlab Provider.

# This will pull a database from gitlab artifacts using `glab` command.
#
# To use this configuration run:
#
# - `ddev remote-db`
# - `ddev pull gitlab --skip-files`

db_pull_command:
command: |
# set -x # You can enable bash debugging output by uncommenting
set -eu -o pipefail
glab ci artifact dev db:artifact --path=".ddev/.downloads"
ddev import-db --file=.ddev/.downloads/db.sql.gz
service: host