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
Add kalacommitbot@kalamuna.com to your pantheon repo
Backup the instance.
New GitHub Repo
Spin up a new github repo for your D8 project
Do not initialize the repo with a README.
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
Add in all your modules contrib, custom, etc with composer or manually
for example
composer require drupal/devel:~1.0
Open up your package.json
Change the name
Convert the repository url to your github repo
Convert the pantheon ssh url to your pantheon repo
Do the following from the sites folder as we won;t need them in a pantheon build:
Delete the production folder
Delete these files: settings.development.php, settings.production.php, sites.php
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', ];
Copy and paste this into web/sites/default/settings.php:
Add https://github.com/pantheon-systems/drops-8/blob/master/sites/default/settings.pantheon.php to web/sites/default
commit all your changes and run the following
Note: This works for now, but we should do a better way of merging the 2 repos like with rebase or XTheirs.
CircleCi
Setup CircleCI: go to https://circleci.com
Sign in, go to projects
click in your org where the github is, then find the repo and build the project
Cancel the build as soon as it starts, we need to tweak the settings
Click the gear icon
Go to Checkout SSH keys
Add your user deploy key for github
Go to SSH Permissions
Add the kalacommitbot SSH key (lastpass or ask Rob Loach)
Restart the build
Review History
Who | When | Status |
---|---|---|
Bob | 20230525 | Deprecated - Style changes |
Rob | 20230517 | Deprecated |