Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,126
Community Members
 
Community Events
168
Community Groups

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

Edited

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

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

Atlassian Community Events