Skip to content

Link vortex-tooling scripts to 'vendor/bin/vortex/*' #2715

Description

@AlexSkrypnyk

Goal

Expose the user-facing drevops/vortex-tooling scripts as stable Composer binaries under vendor/bin/, namespaced with a vortex- prefix, and tighten the version constraint to patch-only.

Status

All prerequisite refactors have landed: the fetch rename, a dedicated import-db, the task runner, the export-db Lagoon backup, the container-image push split, require-tooling in the ahoy entrypoint, and the upload-db-s3 -> push-db-s3 rename (#2740). No open blockers; ready to implement.

Mechanism (verified)

Composer's native bin field flattens to vendor/bin/<basename> (no vortex/ subdirectory) and installs each binary as a realpath-resolving proxy, not a symlink, for both path-repository and Packagist installs. The proxy execs the real src/ script, so the internal "$(dirname "${BASH_SOURCE[0]}")/sibling" routing keeps working once scripts are exposed. Namespace via a filename prefix, not a subdirectory.

Naming

  • Prefix every src/* script with vortex- (all 42) and update every internal reference: the router dispatch targets, the . setup-ssh sources, and the task-<operation>-<platform> lookup.
  • update-vortex becomes vortex-update (avoids the doubled word).

Public surface

List only the user-facing entrypoints in the package bin array (15):

  • vortex-info, vortex-login, vortex-logout, vortex-doctor, vortex-reset
  • vortex-fetch-db, vortex-import-db, vortex-export-db
  • vortex-provision, vortex-deploy, vortex-notify, vortex-update
  • vortex-login-container-registry, vortex-push-db-image, vortex-task

Prefixed but not surfaced (routed leaves and helpers): every fetch-db-*, notify-*, deploy-*, and export-db-* implementation, import-db-file, provision-sanitize-db, the task-* implementations, setup-ssh, push-container-registry, and push-db-s3.

Remaining work

  • Prefix src/* to vortex-* and update internal dispatch references.
  • Add the bin array (15 entrypoints) to the tooling package composer.json.
  • Rewire .ahoy.yml, .lagoon.yml, CI, hooks, and docs to vendor/bin/vortex-*.
  • Provision the vortex-* bins from scripts/vortex-tooling.sh (run from the ahoy entrypoint).
  • Change the root composer.json constraint ^1.2.0 to ~1.2.0.
  • Update the BATS unit tests for the renamed scripts.
  • Regenerate .circleci/vortex-test-common.yml.
  • Run ahoy update-snapshots and commit the regenerated fixtures.

Override mechanism preserved: each binary proxy execs the patched src/vortex-* script, so cweagans/composer-patches customisations keep working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A4Board worker 4

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Release queue

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions