Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending to include other services #100

Open
neilgilmour opened this issue Apr 10, 2024 · 2 comments
Open

Extending to include other services #100

neilgilmour opened this issue Apr 10, 2024 · 2 comments
Assignees

Comments

@neilgilmour
Copy link

I much prefer working in PHP than GitHub actions, so what I'm imagining here is being able to write some of the other steps of my preview workflow as classes that can be added to the pipeline. Maybe with hooks to add classes before and after the existing pipeline, or by overriding existing classes like in laravel-shift/blueprint.

For example instead of GitHub issues we use Linear. The Linear/GitHub integration is a great start, but I have a few other steps that I use;

  1. Check the PR relates to a Linear issue
  2. provision
  3. update linear issue status and comment with preview url

I don't have the skill to PR this, but if @mehrancodes would accept something like this I'd be happy to sponsor the work.

@mehrancodes
Copy link
Owner

mehrancodes commented Apr 14, 2024

Having the Linear integration looks fantastic! I think it would be nice to have some hooks during the provision/teardown process as there are still many custom setups we may need to have based on the project's requirements.

Also, extensions installable via composer could be the perfect fit. As everyone can add their steps and even share their use-case publicly!

I think this one is possible by introducing a new environment variable accepting an array of installed packages - and maybe the step where you would like to use this package. Any thoughts?

@mehrancodes mehrancodes self-assigned this Apr 28, 2024
@mehrancodes
Copy link
Owner

@neilgilmour could you please tell me a little more about the steps where you want to add your functionality? (your extensions)

On the provision command we have 14 steps already that I think we could add before/after events for each one, to trigger an extension to run:

Global steps:

  1. FindServer
  2. FindSiteOrFail

Provision steps

  1. OrCreateNewSite
  2. NginxTemplateSearchReplace
  3. CreateDatabase
  4. InstallGitRepository
  5. ObtainLetsEncryptCertification
  6. EnableQuickDeploy
  7. UpdateEnvironmentVariables
  8. UpdateDeployScript
  9. DeploySite
  10. RunOptionalCommands
  11. EnsureJobScheduled
  12. PutCommentOnPullRequest
  13. AnnounceSiteOnSlack
  14. EnableInertiaSupport

Teardown steps:

  1. RemoveInertiaSupport
  2. RunOptionalCommands
  3. RemoveTaskScheduler
  4. RemoveDatabaseUser
  5. DestroySite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants