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

Creating a deployment artifact #279

Closed
michaellenahan opened this issue May 11, 2017 · 15 comments
Closed

Creating a deployment artifact #279

michaellenahan opened this issue May 11, 2017 · 15 comments

Comments

@michaellenahan
Copy link
Contributor

I am in the process of deploying my first drupal-composer-template-based project. Because the vendor directory is gitignored, I need to create a 'deployment artifact' containing the files I need on the server, and deploy those files to the server.

https://www.jeffgeerling.com/blog/2017/composer-and-drupal-are-still-strange-bedfellows#1

Acquia's Build and Launch tools (https://github.com/acquia/blt) has scripts for doing this.

Is there something similar available for drupal-composer? What scripts are people using?

@thomascys
Copy link

You should use a continuous integration tool for that like Jenkins.

@FatherShawn
Copy link

FatherShawn commented Mar 8, 2018

We use robo to prepare a deployment branch in https://packagist.org/packages/digitalpulp/ballast - the RoboFile could be modified to make a tarball instead. And we use Codeship for our CI to automate this.

@jonpugh
Copy link

jonpugh commented Mar 8, 2018

I think his point is that it would be nice to include a standard script or command in this project for doing this right out of the box.

I'm going to look into building this directly into this project. I started a plugin that adds a composer command some months ago in https://packagist.org/packages/jonpugh/composer-git-build , inspired by the BLT scripts.

If we can collaborate on a simple composer plugin we can create a standard artifact builder command, and then include it in the require-dev of this project, it would be amazing.

@FatherShawn
Copy link

That's a cool idea @jonpugh - I'll have a look. I also looked at the BLT scripts and took some inspiration, but in general a cleaner approach. https://github.com/digitalpulp/ballast/blob/8c227f3c665c9b651ff46b8e54918adc895e1fdd/scripts/robo/RoboFile.php#L709

@derhasi
Copy link
Member

derhasi commented Apr 16, 2018

@jonpugh I'd love to see a "lightweight" alternative of acquia/blt for this purpose. In addition, this would make working with composer easier for beginners.

@FatherShawn
Copy link

@derhasi I think that what we did in Ballast is a lighter weight alternative to BLT

@derhasi
Copy link
Member

derhasi commented Apr 17, 2018

@FatherShawn Ballast looks like a well-thought tool. I personally would like to see just that "build me a branch with all necessary dependencies"-part as an easy to use tool. So the idea of @jonpugh to create a separate command would be great. Maybe that is also something that can come out of Ballast or be reintegrated there.

We currently use a bash script for that purpose and hook that up to our Gitlab CI. I pasted a version of it in https://gist.github.com/derhasi/20ad9f7461192dfdc081c3e31d13df8d

@FatherShawn
Copy link

We have methods for this in Ballast now - it's how we do our deployment, so it would be a small lift to pull out just the branch building into a command. Please open a feature request issue in our project so we can track it.

@vierlex
Copy link

vierlex commented Sep 11, 2018

Is this still in the works? I really love to see this <3

@FatherShawn
Copy link

I haven't had a chance to work on it. Our code is open source and the latest deployment class is here: https://github.com/digitalpulp/ballast/blob/master/scripts/robo/src/Commands/DeployCommands.php

@jonpugh
Copy link

jonpugh commented Aug 26, 2020

@FatherShawn would you be interested in co-developing/maintaining a component that handles this feature?

My coworker @solomongiffored just asked about committing vendor today, and Google gently brought me here!

@leymannx
Copy link
Collaborator

This feature request sounds a bit out-of-scope to me since there are like hundreds of CI SaaS out there and every tool seems to do it differently.

@d70rr3s
Copy link

d70rr3s commented Jul 19, 2021

@leymannx the use case behind a feature like this is in some cases (not as sparse as one may think) your CI environment cannot access Internet for security reasons, so you cannot simply trigger a composer install during the build phase of a pipeline. Instead you have 2 options build your project an generate an artifact with it (preferred, just as Aquia's BLT) or commit your entire dependencies tree to your repository.

@AlexSkrypnyk
Copy link
Collaborator

@AlexSkrypnyk
Copy link
Collaborator

@d70rr3s
Your use case is valid and understood. However, this functionality can be achieved by other tooling that this project does not need to maintain.

Closing as out-of-scope.

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

9 participants