-
Notifications
You must be signed in to change notification settings - Fork 51
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
Can't connect to DB during script in .yml #24
Comments
cd project dir should be before cp. env.... |
I changed it but no difference. Why is it working manually but not within the script? Do you have any idea how can I debug this? |
@Raccoon5031 what do you mean by running manually? |
By manually I mean
So the container is not destroyed if I run my CI. And then I And If I type by myself the following, it is working
The correct database is selected, the tables created and filled by my seeds. No errors. |
@Raccoon5031 ok good, you are right, it is strange. Unless .... Try to add to variables:
BTW Did you try with timer? |
@chilio In the script in copy the .env.dusk.local into .env I also tried this in the script section
And the result contain the following information
So everything looks fine. But the job is still failing. Which runner executor did you choose while registering runner BTW? I don't know if it is useful but ... my runner config looks like this
|
@Raccoon5031 just to double check I would disable cache in runner and also try calling service in this way:
and then in variables section:
To make sure there is no problem with mysql name... Have you tried to cache config? If so |
If I add the alias and change the variable should I also change the My config is not chached, but I'll add Here is my config/database.php, nothing really special here
TestI tried to add the alias but now I have another error
|
@Raccoon5031 mystic things are happening here... |
I removed the MySQL service from the build part
And now the migration and seeding are fine. That's strange but my DB is not necesarry for the builing part so it's not a big deal for me. I tried to retry everything from a fresh new machine (re-install docker and so on) but I still have the same problem. But I'll close this issue anyway, thanks again for your time and patience! |
Hello again,
My build is passing but another error is appearing in the
test
stage.I'm using this in .gitlab-ci.yml
But during the CI, the
php artisan migrate:fresh
is faliing with this errorBut if I connect manually to the docker container. And I run manually the command, everything is working fine concerning the migration & seeding.
Have you any idea why it is not working?
More info
When I connnect to my docker container, I'm also able to run mysql like this
musql -u user -p -h mysql
My database
testing
existThe text was updated successfully, but these errors were encountered: