imagex/swat

A Robo CLI tool for ImageX Projects in Drupal 8+

Maintainers

Details

bitbucket.org/ixm/swat

Homepage

Source

Installs: 115 716

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
    1. Modify php version to match your remote host
  5. Initialize a new git repository
    • git init
    • git add .
    • git commit -m "Initial commit"
  6. ddev composer install
    • Say no to creating grumphp.yml
  7. ddev swat setup
  8. Modify ddev/config.yaml for any stack changes
    • DB, NodeJS, composer, etc versions to match your remote host
    • Custom services, if needed
  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 Remote Setup:

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.