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
2 changes: 1 addition & 1 deletion .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ commands:
usage: Download database. Run with "--fresh" option to force fresh database backup.
aliases: [fetch-db]
cmd: |
case " $* " in *" --fresh "*) export VORTEX_DB_DOWNLOAD_FRESH=1;; esac
case " $* " in *" --fresh "*) export VORTEX_DOWNLOAD_DB_FRESH=1;; esac
./scripts/vortex/download-db.sh
#;> !PROVISION_TYPE_PROFILE

Expand Down
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ aliases:
working_directory: &working_directory ~/project
environment:
#;< !PROVISION_TYPE_PROFILE
VORTEX_DB_DOWNLOAD_SSH_FINGERPRINT: *db_ssh_fingerprint
VORTEX_DOWNLOAD_DB_SSH_FINGERPRINT: *db_ssh_fingerprint
#;> !PROVISION_TYPE_PROFILE
VORTEX_DEPLOY_SSH_FINGERPRINT: *deploy_ssh_fingerprint
docker:
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:

- run:
name: Download DB
command: VORTEX_DB_DOWNLOAD_SEMAPHORE=/tmp/download-db-success ./scripts/vortex/download-db.sh
command: VORTEX_DOWNLOAD_DB_SEMAPHORE=/tmp/download-db-success ./scripts/vortex/download-db.sh
no_output_timeout: 30m

# Execute commands after database download script finished: if the
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
database-nightly:
<<: *job-database
environment:
VORTEX_DB_DOWNLOAD_SSH_FINGERPRINT: *db_ssh_fingerprint
VORTEX_DOWNLOAD_DB_SSH_FINGERPRINT: *db_ssh_fingerprint
VORTEX_DEPLOY_SSH_FINGERPRINT: *deploy_ssh_fingerprint
# Enforce fresh DB build (do not rely on fallback caches).
VORTEX_CI_DB_CACHE_FALLBACK: 'no'
Expand Down Expand Up @@ -616,8 +616,8 @@ jobs:
vortex-dev-didi-database-fi:
<<: *job-database
environment:
VORTEX_DB_DOWNLOAD_SOURCE: url
VORTEX_DB_DOWNLOAD_FORCE: 1
VORTEX_DOWNLOAD_DB_SOURCE: url
VORTEX_DOWNLOAD_DB_FORCE: 1
# Use container image database storage despite that the file is coming
# from CURL - this is to make sure that image is exported into cache
# to be used between jobs. Note that in consumer project .env file would
Expand All @@ -643,8 +643,8 @@ jobs:
vortex-dev-database-ii:
<<: *job-database
environment:
VORTEX_DB_DOWNLOAD_SOURCE: VORTEX_CONTAINER_REGISTRY
VORTEX_DB_DOWNLOAD_FORCE: 1
VORTEX_DOWNLOAD_DB_SOURCE: VORTEX_CONTAINER_REGISTRY
VORTEX_DOWNLOAD_DB_FORCE: 1
VORTEX_DB_IMAGE: drevops/vortex-dev-mariadb-drupal-data-demo-destination-11.x
VORTEX_DEPLOY_CONTAINER_REGISTRY_IMAGE_TAG: vortex-dev-database-ii
# Also, use this job to test pushing of the DB image to the container
Expand Down
20 changes: 10 additions & 10 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ VORTEX_DB_FILE=db.sql

#;< !PROVISION_TYPE_PROFILE
# Database download source.
VORTEX_DB_DOWNLOAD_SOURCE=url
VORTEX_DOWNLOAD_DB_SOURCE=url

#;< DB_DOWNLOAD_SOURCE_CONTAINER_REGISTRY
# Name of the pre-built database container image.
Expand All @@ -186,42 +186,42 @@ VORTEX_DB_DOWNLOAD_SOURCE=url
# Database dump file sourced from a URL.
#
# HTTP Basic Authentication credentials should be embedded into the value.
VORTEX_DB_DOWNLOAD_URL=
VORTEX_DOWNLOAD_DB_URL=
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate key VORTEX_DOWNLOAD_DB_URL detected.

The variable VORTEX_DOWNLOAD_DB_URL is defined twice: once as an empty placeholder (line 189) and again in the DEMO section (line 303) with a demo URL. While this appears intentional for demonstration purposes, duplicate keys can cause confusion. The behavior depends on the parsing method—typically the last value wins.

Consider adding a comment near line 189 indicating that this value is overridden in the DEMO section, or commenting out the placeholder definition to make the intentional override clearer.

Also applies to: 303-303

🤖 Prompt for AI Agents
In @.env at line 189, The .env file contains a duplicate key
VORTEX_DOWNLOAD_DB_URL (placeholder at top and demo URL later); to clarify
intent either comment out or remove the placeholder entry (the one currently
empty) or add an inline comment next to that placeholder explicitly stating it
is intentionally overridden by the DEMO section (reference the
VORTEX_DOWNLOAD_DB_URL key) so readers and parsers won’t be confused about which
value is used.

#;> DB_DOWNLOAD_SOURCE_URL

#;< DB_DOWNLOAD_SOURCE_FTP
# Database dump file sourced from FTP.

# Database dump FTP host.
VORTEX_DB_DOWNLOAD_FTP_HOST=
VORTEX_DOWNLOAD_DB_FTP_HOST=

# Database dump FTP port.
VORTEX_DB_DOWNLOAD_FTP_PORT=21
VORTEX_DOWNLOAD_DB_FTP_PORT=21

# Database dump FTP file name.
VORTEX_DB_DOWNLOAD_FTP_FILE=db.sql
VORTEX_DOWNLOAD_DB_FTP_FILE=db.sql
#;> DB_DOWNLOAD_SOURCE_FTP

#;< DB_DOWNLOAD_SOURCE_S3
# Database dump file sourced from S3.

# AWS S3 bucket name for database download.
VORTEX_DB_DOWNLOAD_S3_BUCKET=
VORTEX_DOWNLOAD_DB_S3_BUCKET=

# AWS S3 region.
VORTEX_DB_DOWNLOAD_S3_REGION=ap-southeast-2
VORTEX_DOWNLOAD_DB_S3_REGION=ap-southeast-2
#;> DB_DOWNLOAD_SOURCE_S3

# Environment to download the database from.
#
# Applies to hosting environments.
# Note that depending on the hosting provider, this variable may represent
# a branch name or an environment name.
VORTEX_DB_DOWNLOAD_ENVIRONMENT=prod
VORTEX_DOWNLOAD_DB_ENVIRONMENT=prod

#;< HOSTING_ACQUIA
# Acquia database name to download the database from.
VORTEX_DB_DOWNLOAD_ACQUIA_DB_NAME=your_site
VORTEX_DOWNLOAD_DB_ACQUIA_DB_NAME=your_site
#;> HOSTING_ACQUIA

#;> !PROVISION_TYPE_PROFILE
Expand Down Expand Up @@ -300,7 +300,7 @@ VORTEX_NOTIFY_WEBHOOK_URL=

#;< DB_DOWNLOAD_SOURCE_URL
# URL of the database used for demonstration with URL database download type.
VORTEX_DB_DOWNLOAD_URL=https://github.com/drevops/vortex/releases/download/25.4.0/db_d11.demo.sql
VORTEX_DOWNLOAD_DB_URL=https://github.com/drevops/vortex/releases/download/25.4.0/db_d11.demo.sql
#;> DB_DOWNLOAD_SOURCE_URL

#;< DB_DOWNLOAD_SOURCE_CONTAINER_REGISTRY
Expand Down
12 changes: 6 additions & 6 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ PACKAGE_TOKEN=

#;< !PROVISION_TYPE_PROFILE
# Always override existing downloaded DB dump.
VORTEX_DB_DOWNLOAD_FORCE=1
VORTEX_DOWNLOAD_DB_FORCE=1

#;< DB_DOWNLOAD_SOURCE_FTP
# Database dump file sourced from FTP.

# Database dump FTP user.
VORTEX_DB_DOWNLOAD_FTP_USER=
VORTEX_DOWNLOAD_DB_FTP_USER=
# Database dump FTP password.
VORTEX_DB_DOWNLOAD_FTP_PASS=
VORTEX_DOWNLOAD_DB_FTP_PASS=
#;> DB_DOWNLOAD_SOURCE_FTP

#;< DB_DOWNLOAD_SOURCE_ACQUIA
Expand All @@ -57,16 +57,16 @@ VORTEX_ACQUIA_SECRET=
# Database dump file sourced from Lagoon.

# SSH file used to download the database dump from Lagoon. Defaults to "${HOME}/.ssh/id_rsa}".
# VORTEX_DB_DOWNLOAD_SSH_FILE=
# VORTEX_DOWNLOAD_DB_SSH_FILE=
#;> DB_DOWNLOAD_SOURCE_LAGOON

#;< DB_DOWNLOAD_SOURCE_S3
# Database dump file sourced from S3.

# AWS access key for S3 database download.
VORTEX_DB_DOWNLOAD_S3_ACCESS_KEY=
VORTEX_DOWNLOAD_DB_S3_ACCESS_KEY=
# AWS secret key for S3 database download.
VORTEX_DB_DOWNLOAD_S3_SECRET_KEY=
VORTEX_DOWNLOAD_DB_S3_SECRET_KEY=
#;> DB_DOWNLOAD_SOURCE_S3

#;< DB_DOWNLOAD_SOURCE_CONTAINER_REGISTRY
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:

- name: Download DB
run: |
VORTEX_DB_DOWNLOAD_SEMAPHORE=/tmp/download-db-success ./scripts/vortex/download-db.sh
VORTEX_DOWNLOAD_DB_SEMAPHORE=/tmp/download-db-success ./scripts/vortex/download-db.sh
echo "db_hash=${{ hashFiles('.data') }}" >> "$GITHUB_ENV"
timeout-minutes: 30
#;< DB_DOWNLOAD_SOURCE_ACQUIA
Expand Down
2 changes: 1 addition & 1 deletion .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tasks:
command: |
if [ "$LAGOON_ENVIRONMENT_TYPE" != "production" ] && [ "$LAGOON_GIT_BRANCH" != "${VORTEX_LAGOON_PRODUCTION_BRANCH:-main}" ]; then
# No need to load SSH file to access production DB as Lagoon has SSH agent keys.
export VORTEX_DB_DOWNLOAD_SSH_FILE=false
export VORTEX_DOWNLOAD_DB_SSH_FILE=false
export VORTEX_DB_DIR=/tmp/data
rm -Rf $VORTEX_DB_DIR || true
./scripts/vortex/download-db.sh
Expand Down
2 changes: 1 addition & 1 deletion .vortex/docs/content/development/database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ download the latest database dump into the `.data` directory.
# Download latest database dump (uses cache if downloaded today)
./scripts/vortex/download-db.sh
# Force a fresh download regardless of cache
VORTEX_DB_DOWNLOAD_FRESH=1 ./scripts/vortex/download-db.sh
VORTEX_DOWNLOAD_DB_FRESH=1 ./scripts/vortex/download-db.sh
```
</TabItem>
</Tabs>
Expand Down
Loading