Hey, I'd like to document proposed integration with Pantheon
Specification
Custom Upstream
Pantheon's WordPress upstream is not compatible with with Nested Docroot (Pantheon's feature allowing serving files from subdirectory). To offer ability to update WP via Pantheon Dashboard we need to create Custom Upstream that contains WP in subdirectory. We could also add Quicksilver hook for triggering CI pushback builds (see CI Magic) in our upstream.
Project generation
During Project generation Chisel should ask if project is expected to be hosted on Pantheon. If so it should verify if build is run in the repository that is clone of our Custom Upstream. During generation process Chisel should be aware that directory with WP is called web, not wp. Chisel should also add basic CI configuration (.gitlab-ci.yml).
CI Magic
Here are things CI should do:
Standard - runs after every commit to the base repository (in our case GitLab), builds project and pushes it to Pantheon.
Pushback - when Client changes code on Pantheon side (for example Plugin install, Wordpress update) and commits it via Pantheon Dashboard CI run is triggered by Quicksliver hook when code is pushed to Pantheon (sync_code) (TODO: should be only when code is committed via Dashboard, not when pushed from CI). This script should ensure that repositories are consistent.
Implemented flow:
Find commit where base branch and Pantheon joins
Verify that all commits on Pantheon on top of that commit are builds (realistically there should be always one build commit on top of "join" commit)
It they are: reset Pantheon to base repository (the same as removing commit with build and then fast forward merge)
If they are not:
Replay commits from Pantheon repository in our repository
ignores build commit(s)
single commits should be cherry picked
merge commits (Wordpress updates) should be created as on Pantheon
chisel-pantheon-magic - node app that does the magic in CI.
chisel-pantheon-docker - docker image that contains chisel-pantheon-magic installed. (Magic requires nodegit that must be compiled and it takes about 10 minutes so I decided to create custom docker image).
Job #21500546 - 🍾 First successful automated push from GitLab CI to Pantheon 🍾 .
Status
Custom Upstream - not started
Project generation (Chisel integration) - not started
CI Magic: Standard - repository, commit shuffling implemented, doesn't do actual builds with Chisel.
CI Magic: Pushback - partially implemented, no triggering configuration or scripts implemented.
Hey, I'd like to document proposed integration with Pantheon
Specification
Custom Upstream
Pantheon's WordPress upstream is not compatible with with Nested Docroot (Pantheon's feature allowing serving files from subdirectory). To offer ability to update WP via Pantheon Dashboard we need to create Custom Upstream that contains WP in subdirectory. We could also add Quicksilver hook for triggering CI pushback builds (see CI Magic) in our upstream.
Project generation
During Project generation Chisel should ask if project is expected to be hosted on Pantheon. If so it should verify if build is run in the repository that is clone of our Custom Upstream. During generation process Chisel should be aware that directory with WP is called
web
, notwp
. Chisel should also add basic CI configuration (.gitlab-ci.yml
).CI Magic
Here are things CI should do:
sync_code
) (TODO: should be only when code is committed via Dashboard, not when pushed from CI). This script should ensure that repositories are consistent.Implemented flow:
Multidev
TBD
Implementation
Links
chisel-pantheon-magic - node app that does the magic in CI. chisel-pantheon-docker - docker image that contains
chisel-pantheon-magic
installed. (Magic requires nodegit that must be compiled and it takes about 10 minutes so I decided to create custom docker image). Job #21500546 - 🍾 First successful automated push from GitLab CI to Pantheon 🍾 .Status