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

Task for Acquia integration #454

Open
isholgueras opened this issue Feb 24, 2024 · 7 comments
Open

Task for Acquia integration #454

isholgueras opened this issue Feb 24, 2024 · 7 comments
Assignees
Labels
client affected enhancement New feature or request

Comments

@isholgueras
Copy link

isholgueras commented Feb 24, 2024

The Acquia integration should have:

  • A task to fetch database (Already in progress)
  • An action to push code to Acquia using deploy:git task in the scaffold directory

Motivation

Make it easier to implement https://architecture.lullabot.com/adr/20230929-drupal-build-steps/ for sites on Acquia

@mrdavidburns
Copy link
Member

mrdavidburns commented Nov 1, 2024

@beto-aveiga Up to now most (all?) of our CI/CD has been done in GitHub Actions.
I would like to see us implement the Acquia deployments for Bitbucket Pipelines.
I've noticed that most of our clients on Acquia tend to use Bitbucket.
This will also give us a working example using Bitbucket Pipelines that we can build from.

Let's limit the work in this ticket to create the task commands.
Let's leverage Acquia CLI (acli) as much as we can.

Then we can work on the Bitbucket Pipeline in a separate issue. see: #728

@beto-aveiga
Copy link
Collaborator

I don't understand if using deploy:git is required.

An action to push code to Acquia using deploy:git task in the scaffold directory

If we plan to use Acquia CLI (acli), shouldn't we use acli push:artifact instead? Example:

        acli push:artifact \
          "project_name_here.${{ github.event.inputs.environment }}" \
          --destination-git-branch="${{ github.event.inputs.environment }}-build"

If we need a new action to push code, will we call it task acquia:push:code?

@mrdavidburns
Copy link
Member

mrdavidburns commented Nov 1, 2024

I feel like we should have some similarities between hosting providers when we execute w/ task.

For example we should have a tasks/acquia.yml file that has its own task fetch-db and that gets loaded into a repo when you configure Drainpipe to support acquia. Similar to how we currently configure Drainpipe to work with pantheon.

https://github.com/Lullabot/drainpipe?tab=readme-ov-file#pantheon-2

includes:
  pantheon: ./vendor/lullabot/drainpipe/tasks/pantheon.yml

Then we update tasks/deploy.yml to support pushing to Acquia using acli like we're doing with terminus
So we may need to update this file to allow task deploy:pantheon and task deploy:acquia
see: https://github.com/Lullabot/drainpipe/blob/main/tasks/deploy.yml
Inside that file we could have:

tasks:
  pantheon:
      ...
  acquia:
     acli push:artifact \
        "project_name_here.${{ github.event.inputs.environment }}" \
        --destination-git-branch="${{ github.event.inputs.environment }}-build"

Then when we work on #204 where we use Acquia CLI on Tugboat
We configure Drainpipe to load Acquia CLI (acli) for Tugboat the same way we configure it to load terminus.
https://github.com/Lullabot/drainpipe?tab=readme-ov-file#pantheon-2:~:text=Additionally%2C%20Pantheon%20Terminus%20can%20be%20added%3A

{
    "extra": {
        "drainpipe": {
            "tugboat": {
              "acli": true
            }
        }
    }
}

Then we we work on adding Bitbucket Pipelines #728 for Acquia
We configure Drainpipe the same way we do Pantheon Deploys.

"extra": {
    "drainpipe": {
        "pipelines": ["Acquia", "Acquia Review Apps"]
    }
}

@beto-aveiga
Copy link
Collaborator

@mrdavidburns: many thanks for the explanation. It is much clearer now. :)

@deviantintegral
Copy link
Member

So we may need to update this file to allow task deploy:pantheon and task deploy:acquia

If we had those as variables (such as task deploy provider=pantheon) then it might make some future work easier? Deploy is a less useful example, but imagining a fetch-db command, if they are separate commands then you can't do task dependencies on them. For example, we might want to have an import-db command that depends on fetch-db, since import-db shouldn't be hosting provider specific.

@mrdavidburns
Copy link
Member

@beto-aveiga during the Drainpipe sync this morning (11/04/24) @justafish pointed out that there is a pull request with some of these task commands already implemented. #442 Can you please build off of that and test it.

@mrdavidburns
Copy link
Member

cc @mmenavas Since you're using some of these integrations on another project let us know how that is working for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client affected enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants