PHPackages                             kanopi/composer-assets-drupal-pantheon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. kanopi/composer-assets-drupal-pantheon

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

kanopi/composer-assets-drupal-pantheon
======================================

Kanopi deployment configuration for Drupal on Pantheon (CircleCI, Kanopi orbs).

0.3.0(1mo ago)03MITPHP

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/kanopi/composer-assets-drupal-pantheon)[ Packagist](https://packagist.org/packages/kanopi/composer-assets-drupal-pantheon)[ RSS](/packages/kanopi-composer-assets-drupal-pantheon/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

kanopi/composer-assets-drupal-pantheon
======================================

[](#kanopicomposer-assets-drupal-pantheon)

Important

**Read-only mirror.** This repository is a subtree split of [`kanopi/kanopi-assets`](https://github.com/kanopi/kanopi-assets) and is updated automatically. Issues are disabled and pull requests are closed automatically — **report issues and open pull requests on the [main `kanopi-assets` repository](https://github.com/kanopi/kanopi-assets).**

CircleCI deployment configuration for **Drupal on Pantheon**, built on the Kanopi orbs (`kanopi/ci-tools`, `kanopi/cms-updates`). Pantheon uses Multidev for preview/QA, so there is **no Tugboat** config here.

Scaffolds
---------

[](#scaffolds)

DestinationUpdate policyPurpose`.circleci/config.yml`replaced on updateFull workflow: phpcs/phpstan/rector/twig, deploy→cypress/lighthouse/pa11y/sdtt/backstop, automated-updates, cron`.circleci/env.sh`**seed once** (`overwrite:false`)The per-project fill-in file`.circleci/scripts/compile-theme.sh`replaced on updateTheme build (npm/yarn `$THEME_BUILD_COMMAND`), in place — runs in the deploy job before the Pantheon artifact is built`.circleci/scripts/pantheon/dev-multidev`replaced on updatePantheon dev/multidev deploy`.circleci/scripts/pantheon/pre-deploy.sh`**seed once** (`overwrite:false`)Optional CI hook, runs before the artifact push (ships empty)`.circleci/scripts/pantheon/post-deploy.sh`**seed once** (`overwrite:false`)Optional CI hook, runs after the release tasks (ships empty)`{web/private,private}/scripts/quicksilver/drush-deploy.php`**seed once** (`overwrite:false`)Quicksilver hook: `drush deploy` after a platform deploy`{web/private,private}/scripts/quicksilver/new_relic_deploy.php`**seed once** (`overwrite:false`)Quicksilver hook: record the deploy in New Relic`pantheon.yml`**seed once** (`overwrite:false`)Platform config + Quicksilver `deploy` hooks (skipped if you already have one)The Quicksilver scripts and `pantheon.yml` are placed by composer-assets **conditional** mapping: under `web/private/` when a `web/` docroot exists, else `private/` — and the matching `pantheon.yml` variant (`web_docroot: true` vs not) is seeded with paths to match. No deploy-time staging.

The logic lives in the orbs and the shipped files; per-project values live only in `env.sh`. **Bump the orb version or update this package to roll a fix to every site.** To diverge, a site sets `".circleci/config.yml": false` (or the script path) in its own `composer.json` and commits its own copy.

Fill in `.circleci/env.sh`
--------------------------

[](#fill-in-circlecienvsh)

`TERMINUS_SITE`, `PANTHEON_UUID`, `DEFAULT_BRANCH`, `DOCROOT`, `THEME_NAME`, `THEME_PATH`, `NODE_VERSION`, `NODE_PACKAGE_MANAGER` (`npm`/`yarn`). The **PHP**version is a pipeline parameter at the top of `config.yml` (the docker image resolves before `env.sh` can be sourced); **Node** is installed at runtime via nvm, so `NODE_VERSION` lives in `env.sh`.

Deploy hooks
------------

[](#deploy-hooks)

`pre-deploy.sh` and `post-deploy.sh` (seeded once, committed, **yours to edit**) let you customize the deploy without forking `dev-multidev`. They ship empty and run only if present — `pre-deploy.sh` before the artifact is pushed, `post-deploy.sh` after the release tasks (`drush deploy` + cache clear), with `$TERMINUS_SITE.$TERMINUS_ENV` in scope and terminus authenticated.

These are **CI-side** hooks (CircleCI deploys to dev/multidev). For **platform**deploys (dev→test→live promotions), see Quicksilver below.

Quicksilver hooks
-----------------

[](#quicksilver-hooks)

`pantheon.yml` registers `workflows.deploy.after` hooks that run **on Pantheon**after every code deploy — including dashboard promotions that never touch CI:

- **`drush-deploy.php`** — runs `drush deploy` (db updates, cache rebuild, config import, deploy hooks) on the deployed environment.
- **`new_relic_deploy.php`** — records a deploy marker in New Relic. Requires the site secret: `terminus secret:site:set  new_relic_api_key `.

composer-assets seeds both scripts and `pantheon.yml` under `web/private/` when a `web/` docroot exists, else `private/` (conditional mapping on `exists: web`), so the hook paths always resolve and the scripts ship in the committed artifact — no deploy-time staging. **If your project already has a `pantheon.yml`**, the seeded one is skipped — copy its `workflows` block in by hand.

Toggling stages
---------------

[](#toggling-stages)

- **Theme build** — set `BUILD_THEME="false"` in `env.sh` for a theme-less / no-build site (`compile-theme.sh` then skips the build; it also auto-skips when the theme has no `package.json`).
- **Post-deploy jobs** — `config.yml` exposes boolean pipeline parameters (`run_cypress`, `run_lighthouse`, `run_pa11y`, `run_sdtt`, `run_backstop`), all default `true`. Flip a default to `false` to skip that job. These are jobs, not steps, so they live in `config.yml`, not `env.sh` — CircleCI resolves the workflow before `env.sh` is sourced.

Secrets (CircleCI `kanopi-code` context — never in the repo)
------------------------------------------------------------

[](#secrets-circleci-kanopi-code-context--never-in-the-repo)

`TERMINUS_TOKEN`, `GITHUB_TOKEN`, `DOCKERHUB_USER`, `DOCKERHUB_PASS`, `SLACK_WEBHOOK`. Add the deploy SSH key under **Project Settings → SSH Keys**.

Scheduled pipelines
-------------------

[](#scheduled-pipelines)

- **automatic updates** — name a CircleCI scheduled trigger `automatic updates`.
- **cron job …** — name a trigger starting with `cron job`; set the `cron_env`pipeline parameter to the target Pantheon env.

Code quality (PHPStan, Rector, Twig CS Fixer)
---------------------------------------------

[](#code-quality-phpstan-rector-twig-cs-fixer)

`phpstan.neon`, `rector.php`, and `.twig-cs-fixer.php` are seeded once (`overwrite:false`) at the repo root — yours to tune, modeled on [kanopi/drupal-starter](https://github.com/kanopi/drupal-starter). They're docroot-agnostic: the scan paths live in the `composer` scripts, not the configs.

The configs only run once your project `composer.json` has the tools and the scripts the CI invokes (`code-sniff-ci`, `phpstan-ci`, `rector-modules-ci`, `rector-themes-ci`, `twig-lint-ci`). Copy those scripts from drupal-starter (scan paths under `web/modules/custom` and `web/themes/custom`) and add:

```
"require-dev": {
    "drupal/coder": "^8.3",
    "mglaman/phpstan-drupal": "^2.0",
    "palantirnet/drupal-rector": "^0.21.0",
    "vincentlanglet/twig-cs-fixer": "^3"
},
"config": { "allow-plugins": {
    "dealerdirect/phpcodesniffer-composer-installer": true,
    "phpstan/extension-installer": true
} }
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance92

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

39d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf9dca5c46910be861bb00920034637b5a36a1f6277413be6817a50a1ce6fc74?d=identicon)[kanopi\_studios](/maintainers/kanopi_studios)

---

Top Contributors

[![sean-e-dietrich](https://avatars.githubusercontent.com/u/1564748?v=4)](https://github.com/sean-e-dietrich "sean-e-dietrich (9 commits)")

---

Tags

drupalpantheonCircleCIdeploymentkanopicomposer-assets

### Embed Badge

![Health badge](/badges/kanopi-composer-assets-drupal-pantheon/health.svg)

```
[![Health](https://phpackages.com/badges/kanopi-composer-assets-drupal-pantheon/health.svg)](https://phpackages.com/packages/kanopi-composer-assets-drupal-pantheon)
```

###  Alternatives

[ondram/ci-detector

Detect continuous integration environment and provide unified access to properties of current build

22255.4M50](/packages/ondram-ci-detector)[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6552.1M20](/packages/timokoerber-laravel-one-time-operations)[andres-montanez/magallanes

The Deployment Tool for PHP Applications

6931.1M6](/packages/andres-montanez-magallanes)[dg/ftp-deployment

A tool for automated deployment of web applications to an FTP server.

624853.2k8](/packages/dg-ftp-deployment)[easycorp/easy-deploy-bundle

The easiest way to deploy Symfony applications

467313.4k](/packages/easycorp-easy-deploy-bundle)[jalogut/magento2-deployer-plus

Magento 2 deployment tool based on deployer.org

201444.0k](/packages/jalogut-magento2-deployer-plus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
