smichaelsen/typo3-gitlab-ci

Deployment for dev & master

Opened this issue · 3 comments

I have 2 environments. Live is master with require and develop with require-dev.

How can I deploy this automatically with your script?

Greetings Heiko

I consider require-dev to include packages that a developer needs on their machine, not to be deployed to a server. Of course you are free to have a different understanding of require-dev, but this script does not support it. Sorry.

I made my question unclear. I have a customer with a test and live system. The branch "dev" is deployed to the test system, the branch "master" to the live system. The stands of both systems differ partly due to acceptance and further development. So I have 2 possibilities to implement the problem: Either I create an own composer.json for each branch (so composer.json => master, composer.dev.json) or I copy the script from you and use only and then give another composer command.

Which way would be better? I don't have real GitLab CI experience.

Having different servers that are "tied" to different branches is also what I do regularly and this is supported by this script.
But I don't think you need a composer.dev.json. Let's take for an example you want to install Yoast SEO. First you would add yoast-seo-for-typo3/yoast_seo to your composer.json on your dev branch. When it is well tested you will merge or cherry-pick (whatever your branching workflow is) your change to master.
On GitLab CI you will always only perform composer install (this script does it for you), which will install the dependencies your branch needs.
The deployment to different servers by this script is controlled via GitLab CI Variables.
With dev_SSH_HOST and master_SSH_HOST you can set different deployment targets for exampe.