Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set up runners for Linux Docker but test failed with mysql connection refused

Eric San
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2022

Hi

I am trying to setup self host runner on my server. Build and Test pass when it was running on Bitbucket Pipeline but when add self host, build and test starting to fail at - ./vendor/bin/pest --coverage script and the error is mysql connection refused on all of the failed test cases. My application framework is Laravel.

I scoured the internet looking for answer before posting this question. Please be kind.

Here is my bitbucket-pipelines.yml:

image: 
name: ericsssan/altern8:v1.0.1
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
email: $DOCKER_HUB_EMAIL

pipelines:
pull-requests:
'**':
- step:
runs-on:
- self.hosted
- linux
name: Build and Test
script:
- ln -f -s .env.pipelines .env
- composer install
- php artisan key:generate
- php artisan optimize:clear
- ./vendor/bin/pest --coverage
- npm ci --legacy-peer-deps
- npm run coverage
- npm run build
artifacts: # defining the artifacts to be passed to each future step.
- public/build/**
- vendor/**
- node_modules/**
services:
- mysql
- redis

definitions:
services:
redis:
image: redis
mysql:
image: mysql:5.7
variables:
MYSQL_DATABASE: $DB_DATABASE
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: $DB_USERNAME
MYSQL_PASSWORD: $DB_PASSWORD

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2022

Hi Eric,

In order to be able to better help you, would it be possible for you to share the following?

  1. the full output of the command that is failing from the Pipelines Build log
  2. the mysql log from the Pipelines build (if you open the build on Bitbucket website, select the tab mysql and copy-paste its content here)

Please make sure to sanitize any private/sensitive info from both, prior to sharing here.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events