G
G
Gruberhoff2016-11-09 14:59:13
Amazon Web Services
Gruberhoff, 2016-11-09 14:59:13

Please explain about building and deploying projects with Travis CI?

I want to use Travis CI to build and deploy a PHP project to ubuntu server (there are several environments).
Naturally, you need to remember to create backups before deploying and automatically apply the added SQL files to the repository to the database.
There is a separate repo with sh scripts for creating a backup archive, executing new sql scripts, unpacking libraries, running Grunt tasks, etc.
I understand that I can put the .travis.yml file in the root of the main repository, then after the commit, Travis will raise a clean VM with the settings I need and make a clone of the repository into it.
Q: What tasks can Travis do for me? Considering what I described above.
I don't need to run tests.
The first step is a backup. My working project is deployed on a working server, but I can't run my backup.sh script in travis.yml. And this script itself is not on Travis's VM, but it lies in a separate repo.
The second step is to run sql queries on the database, and again, travis does not have my working database so that he can do this with run_sql.sh
For deployment, I will use the AWS CodeDeploy provider and it is logical that he should take care of all this.
Am I talking right? I want to ask you to correct where I'm wrong or add my thoughts on how to arrange a project deployment.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kamovski, 2016-11-14
@Gruberhoff

If you do not need to run tests on a third-party service such as Travis CI, provided that you already have build scripts and want to use the capabilities of AWS CodeDeploy for deployment, then you are better off building a production combine based on native solutions from AWS: CodeDeploy ( make sure its agent is installed on your server), CodePipeline.
As an option, you can wrap the script deployment logic through OpsWork. AWS has a lot of options, rather, first of all, you need to answer the question of what exactly Travis CI gives in your case and already build a continuous deployment scheme regarding this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question