Converting a vanilla D8 project to a composer build that pushes to CircleCI - DEPRECATED

 

DEPRECATED

The information below is either outdated, or no longer considered best practice at Kalamuna.

The following are preferred...

Find a new guide on the current best practice at https://kalamuna.atlassian.net/wiki/spaces/KALA/pages/592674817

Original Article

Existing Pantheon Repo

  1. Add kalacommitbot@kalamuna.com to your pantheon repo

  2. Backup the instance.

New GitHub Repo

  1. Spin up a new github repo for your D8 project

  2. Do not initialize the repo with a README.

  3. Run these commands

    git clone YOUR-REPO cd YOUR-REPO-FOLDER git remote add dp git@github.com:kalamuna/drupal-project.git git pull dp 8.x-kala



  4. Add in all your modules contrib, custom, etc with composer or manually

    1. for example

      composer require drupal/devel:~1.0



  5. Open up your package.json

    1. Change the name

    2. Convert the repository url to your github repo

    3. Convert the pantheon ssh url to your pantheon repo

  6. Do the following from the sites folder as we won;t need them in a pantheon build:

    1. Delete the production folder

    2. Delete these files: settings.development.php, settings.production.php, sites.php

  7. Copy and paste this into web/sites/settings.common.php:

    <?php /** * @file * The main Drupal configuration file with settings common to all environments. */ // Load services definition file. $settings['container_yamls'][] = "$app_root/sites/services.yml"; // Define the default list of folders that will be ignored by Drupal's file API. $settings['file_scan_ignore_directories'] = [ 'node_modules', 'bower_components', ];



  8. Copy and paste this into web/sites/default/settings.php:



  9. Add https://github.com/pantheon-systems/drops-8/blob/master/sites/default/settings.pantheon.php to web/sites/default

  10. commit all your changes and run the following

    1. Note: This works for now, but we should do a better way of merging the 2 repos like with rebase or XTheirs.

CircleCi

  1. Setup CircleCI: go to https://circleci.com

  2. Sign in, go to projects

  3. click in your org where the github is, then find the repo and build the project

  4. Cancel the build as soon as it starts, we need to tweak the settings

  5. Click the gear icon 

    1. Go to Checkout SSH keys

      1. Add your user deploy key for github

    2. Go to SSH Permissions

      1. Add the kalacommitbot SSH key (lastpass or ask Rob Loach)

  6. Restart the build


Review History

Who

When

Status

Who

When

Status

Bob

20230525

Deprecated - Style changes

Rob

20230517

Deprecated