Using the Pantheon CircleCI Orb (committing code from packages installed via Composer)

I am using the pantheon-systems/pantheon@0.5.2 orb on circleci. I have been able to successfully with the just_push workflow with its pantheon/push job to push up my code to a Multidev env. but I am not sure the best way to set up a push that includes all code that is required by composer. Is there a job I can use that will execute a composer install on the target Multidev env or do i need too just do some scripting to push that code along with the code in my github repo?

Thanks so much!

1 Like

Hi, @testevez. Thanks for posting your question here! I’m contacting my team to see if someone can help. We’ll be in touch!

Hi, @testevez. See below for two questions that came up that our team wanted to ask you before responding with more info:

  • Are you asking if the platform does composer install? If so, this integrated composer doc may be helpful.
  • Do you need to know how to push new code once a pull request has been merged?

1- I know that composer installs are possible, I set up the site relevant this post as such (github repo, circleci and multidev CI/CD pipeline).
2- Not quite

I will expand. As I stated inn #1, the site was set up a certain way that I am trying to restore. About a year ago, my github + circleci stopped working so I just started to use basic method of committing to the site’s pantheon repos which got the job done. I am now trying to restore my original CI/CD setup.

Seps I have taken so far:

  • replace my old .circleci config with the new, orb based config: pushes fine but the push doesn’t included build artifacts that composer installed (my original post was able this topic)
  • update my .circleci and .ci folder with new code from the the first 3 jobs are successful (static_tests, configure_env_vars, build_php) but I can an issue on the forth (deploy_to_pantheon).

I have read the doc you passed along, but I was trying to avoid setting up a new D9 site and migrating the D8 to it. I was keen on the idea of just restoring my circleci workflow and jus updating to 9 with composer.

In both of my different routes of getting my github repo to update the site (instead of committing directly to pantheon repo) I just can’t get composer-defined packages deployed.

1 Like

This is the error I get on the _ deploy_to_pantheon_ job:

[notice] Logging in via machine token.

[notice] Pushing code to pr-124 using branch pr-124.
[notice] Running git -C /home/tester/example_drops_8_composer remote add pantheon ssh://
[notice] Set build-metadata.json to {“url":"********.git”,“ref”:“nocomposer”,“sha”:“966965ea21bd0bda279fd6ccdd06ff26c9b1f2f6”,“comment”:“Latest composer that matches the pantheon repo”,“commit-date”:“2022-03-29 21:04:16 -0600”,“build-date”:“2022-03-30 03:05:15 +0000”}.
[notice] Running git -C /home/tester/example_drops_8_composer checkout -B pr-124
Switched to a new branch ‘pr-124’
M .gitignore
[notice] Running git -C /home/tester/example_drops_8_composer add --force -A .
[notice] Running git -C /home/tester/example_drops_8_composer commit -q -m ‘Build assets for pr-124.’
[notice] Enabled git push mode for “pr-124”
[notice] Running git -C /home/tester/example_drops_8_composer push --force -q pantheon pr-124
[notice] Workflow ‘Sync code on pr-124’ running.
[notice] Workflow ‘Sync code on pr-124’ running.
[notice] Workflow ‘Sync code on pr-124’ running.
[notice] Workflow ‘Sync code on pr-124’ running.
[notice] Workflow ‘Sync code on pr-124’ running.
[notice] Workflow ‘Sync code on pr-124’ succeeded.
[notice] Workflow succeeded
[notice] Enabled on-server development via SFTP for “pr-124”
Warning: Permanently added ‘[]:2222,[]:2222’ (RSA) to the list of known hosts.

In BootstrapHook.php line 32:

Bootstrap failed. Run your command with -vvv for more information.

[notice] Command: ********.pr-124 – drush updatedb [Exit: 1]

Exited with code exit status 1
CircleCI received exit code 1

1 Like

As an update, I have given up on using drops 8 and now I am using the orb and its great. It would be nice to have some multidev support with it though. I am moving on that, updates to follow!

1 Like

Thanks for sharing this update and for documenting your progress on this! This will be immensely helpful for others encountering similar issues. I’m checking in with my team about multidev support and will try to get back with you soon. Apologies in advance for any delays as most of our team is at DrupalCon Portland this week.

Another update:The Orb does everything I need it to and it looks pretty easy to modify. To be clear, most of my troubles had to do with my need to learn more re: CI/CD as opposed to any trouble with the tools.

At this point, I have everything running on rails and my workflow is humming along nicely. If anyone in the community is in a similar situation to mine at the start of this thread, please reach out to me so I can help.


1 Like