imagex/swat

A Robo CLI tool for ImageX Projects in Drupal 8+

Maintainers

Details

bitbucket.org/ixm/swat

Homepage

Source

Installs: 114 925

Dependents: 1

Suggesters: 0

Security: 0

Type:phpcodesniffer-standard


README

SWAT 5 Logo

(SUPER WICKED AWESOME TOOL)

SWAT is meant to be a helper for projects within ImageX. It provides a ddev setup, some templated Bitbucket pipelines and deployment helpers. And it's super wicked awesome.

Requirements

SWAT requires the following to run:

  1. DDev - https://ddev.readthedocs.io/
  2. Composer - https://getcomposer.org/
  3. PHP >=8.1
Available Commands

Run ddev swat list to get a listing of available commands.

GETTING STARTED

New projects must use Drupal 10.

  1. git clone git@bitbucket.org:ixm/swat-project-template.git <project-name>
  2. cd <project-name>
  3. rm -rf .git
  4. ddev config --docroot=docroot --project-type=drupal --php-version=8.3
  5. Initialize a new git repository
    1. git init
    2. git add .
    3. git commit -m "Initial commit"
  6. ddev composer install
    1. Say no to creating grumphp.yml
  7. ddev swat setup
  8. Modify ddev/config.yaml for any stack changes
    1. PHP, Composer, Node, DB, etc versions to match your remote host
  9. ddev restart
  10. ddev swat install
  11. Export your config.
  12. Setup your git remote in swat/swat.yml (see example below)
  13. Push your code to Bitbucket:
    • git remote add origin git@bitbucket.org:example/example.git
    • git add . && git commit -m "PROJ-1: Initial Setup for <project>."
    • git push -u origin master

Git:

Example of Git config in swat.yml for remote:

    git:
      default_branch: develop
      remotes:
        cloud: 'ixmcomponents@svn-4707.devcloud.hosting.acquia.com:ixmcomponents.git'
      user:
        name: 'ImageX Media'
        email: no-reply@imagexmedia.com

Hosting Provider

See our internal documentation: Configuring your hosting provider files

See DDEV documentation: Hosting Provider Integration

Existing Projects

Existing projects generally should be manually upgraded until such an update script exists.