Skip to content

Commit

Permalink
Updated to Vortex 24.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Sep 1, 2024
1 parent fe6dd9a commit de96e23
Show file tree
Hide file tree
Showing 86 changed files with 1,887 additions and 1,805 deletions.
75 changes: 45 additions & 30 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ commands:
ahoy fei # Install front-end dependencies.
ahoy fe # Build front-end assets.
ahoy provision # Provision the site.
DREVOPS_SHOW_LOGIN=1 ahoy info # Show information and a login link.
VORTEX_SHOW_LOGIN=1 ahoy info # Show information and a login link.
info:
usage: Show information about this project.
cmd: |
COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-${PWD##*/}} \
DREVOPS_HOST_DB_PORT=$(docker compose port mariadb 3306 2>/dev/null | cut -d : -f 2) \
DREVOPS_HOST_SOLR_PORT=$(docker compose port solr 8983 2>/dev/null | cut -d : -f 2) \
DREVOPS_HOST_HAS_SEQUELACE=$(uname -a | grep -i -q darwin && mdfind -name 'Sequel Ace' 2>/dev/null | grep -q "Ace" && echo 1 || true) \
ahoy cli ./scripts/drevops/info.sh "$@"
VORTEX_HOST_DB_PORT=$(docker compose port mariadb 3306 2>/dev/null | cut -d : -f 2) \
VORTEX_HOST_SOLR_PORT=$(docker compose port solr 8983 2>/dev/null | cut -d : -f 2) \
VORTEX_HOST_SELENIUM_VNC_PORT=$(docker compose port chrome 7900 2>/dev/null | cut -d : -f 2) \
VORTEX_HOST_HAS_SEQUELACE=$(uname -a | grep -i -q darwin && mdfind -name 'Sequel Ace' 2>/dev/null | grep -q "Ace" && echo 1 || true) \
ahoy cli ./scripts/vortex/info.sh "$@"
db:
usage: Open DB in Sequel Ace.
cmd: |
uname -a | grep -i -q darwin && mdfind -name 'Sequel Ace' 2>/dev/null |grep -q "Ace" \
&& DREVOPS_HOST_DB_PORT="$(docker port $(docker compose ps -q mariadb 2>/dev/null) 3306 2>/dev/null | cut -d : -f 2)" \
&& open "mysql://${MARIADB_USERNAME:-drupal}:${MARIADB_PASSWORD:-drupal}@127.0.0.1:${DREVOPS_HOST_DB_PORT}/drupal" -a "Sequel Ace" \
&& VORTEX_HOST_DB_PORT="$(docker port $(docker compose ps -q mariadb 2>/dev/null) 3306 2>/dev/null | cut -d : -f 2)" \
&& open "mysql://${MARIADB_USERNAME:-drupal}:${MARIADB_PASSWORD:-drupal}@127.0.0.1:${VORTEX_HOST_DB_PORT}/drupal" -a "Sequel Ace" \
|| echo "Not a supported OS or Sequel Ace is not installed."
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -85,9 +86,9 @@ commands:
# arguments that contain spaces.
cmd: |
if [ "${#}" -ne 0 ]; then
docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|DOCKER_\|DRUPAL_\|DREVOPS_" | sed 's/^/-e /') -T cli bash -c "$*"
docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|DOCKER_\|DRUPAL_\|VORTEX_" | sed 's/^/-e /') -T cli bash -c "$*"
else
docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|DOCKER_\|DRUPAL_\|DREVOPS_" | sed 's/^/-e /') cli bash
docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|DOCKER_\|DRUPAL_\|VORTEX_" | sed 's/^/-e /') cli bash
fi
composer:
Expand All @@ -99,7 +100,7 @@ commands:
drush:
usage: Run Drush commands in the CLI service container.
cmd: ahoy cli "vendor/bin/drush -l \${DREVOPS_LOCALDEV_URL} $*"
cmd: ahoy cli "vendor/bin/drush -l \${VORTEX_LOCALDEV_URL} $*"

flush-redis:
usage: Flush Redis cache.
Expand All @@ -112,11 +113,11 @@ commands:
login:
usage: Login to a website.
# Unblock user 1 and generate a one time login link.
cmd: ahoy cli ./scripts/drevops/login.sh
cmd: ahoy cli ./scripts/vortex/login.sh

download-db:
usage: Download database.
cmd: ./scripts/drevops/download-db.sh
cmd: ./scripts/vortex/download-db.sh

reload-db:
usage: Reload the database container using local database image.
Expand All @@ -127,47 +128,47 @@ commands:
ahoy up wait_dependencies && \
sleep 15 && \
ahoy provision && \
DREVOPS_SHOW_LOGIN=1 ahoy info
VORTEX_SHOW_LOGIN=1 ahoy info
provision:
usage: Provision a site from the database dump or profile.
cmd: ahoy cli ./scripts/drevops/provision.sh
cmd: ahoy cli ./scripts/vortex/provision.sh

export-db:
usage: Export database dump or database image (if DREVOPS_DB_IMAGE variable is set).
cmd: ./scripts/drevops/export-db.sh "$@"
usage: Export database dump or database image (if VORTEX_DB_IMAGE variable is set).
cmd: ./scripts/vortex/export-db.sh "$@"

pull-db:
usage: Download database image with the latest nightly dump. Run "ahoy reload-db" to reload DB in the running stack.
cmd: \[ -n "${DREVOPS_DB_IMAGE}" \] && docker pull ${DREVOPS_DB_IMAGE} || true
cmd: \[ -n "${VORTEX_DB_IMAGE}" \] && docker pull ${VORTEX_DB_IMAGE} || true

reset:
usage: "Remove containers, all build files. Use with `hard` to reset repository to the last commit."
cmd: |
ahoy confirm "All containers and build files will be removed. Proceed?" &&
AHOY_CONFIRM_RESPONSE=y ahoy down && ./scripts/drevops/reset.sh "$@"
AHOY_CONFIRM_RESPONSE=y ahoy down && ./scripts/vortex/reset.sh "$@"
fei:
usage: Install front-end assets.
cmd: ahoy cli "npm --prefix ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} install"
cmd: ahoy cli "npm --prefix ${VORTEX_WEBROOT}/themes/custom/${DRUPAL_THEME} install"

fe:
usage: Build front-end assets.
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build"
cmd: ahoy cli "cd ${VORTEX_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build"

fed:
usage: Build front-end assets for development.
cmd: ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build-dev"
cmd: ahoy cli "cd ${VORTEX_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run build-dev"

few:
usage: Watch front-end assets during development.
cmd: |
ahoy cli "pkill -9 -f grunt" || true
ahoy cli "cd ${DREVOPS_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run watch"
ahoy cli "cd ${VORTEX_WEBROOT}/themes/custom/${DRUPAL_THEME} && npm run watch"
lint:
usage: Lint back-end and front-end code.
cmd: ahoy lint-be && ahoy lint-fe
cmd: ahoy lint-be && ahoy lint-fe && ahoy lint-tests

lint-be:
usage: Lint back-end code.
Expand All @@ -181,14 +182,28 @@ commands:
usage: Lint front-end code.
cmd: |
ahoy cli vendor/bin/twig-cs-fixer lint
ahoy cli "npm run --prefix \${DREVOPS_WEBROOT}/themes/custom/\${DRUPAL_THEME} lint"
ahoy cli "npm run --prefix \${VORTEX_WEBROOT}/themes/custom/\${DRUPAL_THEME} lint"
lint-tests:
usage: Lint tests code.
cmd: |
ahoy cli vendor/bin/gherkinlint lint tests/behat/features
lint-fix:
usage: Fix lint issues of back-end and front-end code.
cmd: ahoy lint-be-fix && ahoy lint-fe-fix

lint-be-fix:
usage: Fix lint issues of back-end code.
cmd: |
ahoy cli vendor/bin/rector --clear-cache
ahoy cli vendor/bin/phpcbf
lint-fe-fix:
usage: Fix lint issues of front-end code.
cmd: |
ahoy cli vendor/bin/twig-cs-fixer lint --fix
ahoy cli "npm run --prefix \${VORTEX_WEBROOT}/themes/custom/\${DRUPAL_THEME} lint-fix"
test:
usage: Run all tests.
Expand Down Expand Up @@ -218,21 +233,21 @@ commands:
usage: Run remote deployment procedures.
cmd: |
ahoy confirm "Deployment usually runs in CI. Are you sure you want to proceed with manual deployment? (Run as ahoy deploy [type1,[type2..]], where [type] is 'code', 'container_registry', 'webhook')" &&
./scripts/drevops/deploy.sh "$@"
./scripts/vortex/deploy.sh "$@"
github-labels:
usage: Update project's GitHub labels.
cmd: ./scripts/drevops/github-labels.sh "$@"
cmd: ./scripts/vortex/github-labels.sh "$@"

doctor:
usage: Find problems with current project setup.
cmd: ./scripts/drevops/doctor.sh "$@"
cmd: ./scripts/vortex/doctor.sh "$@"

update-scaffold:
usage: Update DrevOps stack.
update-vortex:
usage: Update Vortex stack.
cmd: |
ahoy confirm "Some committed files may become overwritten. Proceed?" &&
./scripts/drevops/update-scaffold.sh $@
./scripts/vortex/update-vortex.sh $@
local:
usage: Custom local commands. See `ahoy local help`.
Expand Down
Loading

0 comments on commit de96e23

Please sign in to comment.