-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to deploy laravel after succesfull test? #1
Comments
Hello, thank you for filing this issue. Currently, the GitLab config file is written in a way which isn't very staging or deployment friendly. I'll work on it and include 'jobs' section. To answer your question, it is possible. You can add a script to do a git push to your DigitalOcean after build is complete. Here's a quick theoretical example:
|
Hi, I've made a new branch for this -- https://github.com/GIANTCRAB/gitlabby-dockerish-laravel/tree/5.3-develop I'll test this when I get home, meanwhile, feel free to test this branch and let me know if it works for you. Thank you. |
Thank you. I will try it. |
I do not get how to setup |
Hmmm, I noticed that your CD pipe is a "pull" and not a "push". The one that was included is a "push" config which requires the staging server to also be a Git server and act as a remote. I'll write another one for "pull" style and let you know again. Thank you! |
I have made a new commit to help integrate and solve the issue you have. ea2a8f2 For this pull configuration, the variables for Let me know if you have any other questions. Thank you! :) |
Thank you! I will check it and give you feedback. But at the moment I am stucked with another problem. I have to create one database in dockerish env. I have tried to execute following command inside but this fails on GitLab CI with following error:
Here is last few lines from CI console:
Any idea how to access mysql from |
The Docker image provided is minimal and does not contain mysql. Hence, you would need to do it through PHP. Create a PHP file with the following code (edit as needed) and then execute it through the command line:
If you would want to do it through Laravel, it is also possible -- https://laravel.io/forum/09-13-2014-create-new-database-and-tables-on-the-fly |
Thanks man!!!! |
I have tried deployment but build fails .. not sure why: https://www.diigo.com/file/image/sspsorrzdqbdaqeqqzcqoobsqa/build_job+%28%2310336317%29+%C2%B7+Jobs+%C2%B7+kibernum-dnc+%2F+kibernum-dnc-api+%C2%B7+GitLab.jpg here is my .gitlab-ci.yml gist NOTE: In short - you have to copy your entire private key into variable. |
New problem ... previous one fixed now some problem related to access to my sql. Build pipeline fails: Where is physical location of code which executes? How IP Maybe the problem is in the context:
Is this build code executing inside Docker on GitlabCI or DROPLET_1 or DROPLET_2? NOTE: This problem is fixed. Here is info for others who find themselfes in the same situation. |
Now my test pipeline fails with Seems that phpunit is not installed on test? NOTE:
@GIANTCRAB , Also I have changed first line in Now test pipeline pass! Great! |
Now deploy fails with
:( @GIANTCRAB,
I have generated this key with following command: NOTE:
and that's it! :) |
Hi, thanks for testing and giving information. (I was asleep at the time of which you posted the comments)
That is very weird since the build stage runs before test. I'll look into this. Your current method works but it would mean that you would be running twice the actions of a build process.
That is a very odd issue indeed. Thank you, I'll incorporate these fixes! |
Hey man, I think you caan slose issue or I should? |
I have fixed the test stage issue. It seems like files are not automatically saved over to the other job by default. A new commit has been made to add the use of artifacts and dependencies -- 1364f03 I've tested the new one and it works fine for me. Thank you and have a great day ahead. |
Hi!
Thanks for this. Very helpfull. I have found this repo after HOW TO: LARAVEL TESTING ON GITLAB CI WITH DOCKER
I have managed to succesfully run test build on Gitlab CI using Gitlab Runner on digitaocean. Now I am wondering if it is possible to do deplyment after test has been executed.
This is my deploy process on my staging env:
How I can manage to include this deploy after test is done?
The text was updated successfully, but these errors were encountered: