This looks crazy but suddenly my bitbucket pipelines started to fail because access denied.
pymysql.err.OperationalError: (1045, "Access denied for user 'example-user'@'127.0.0.1' (using password: NO)")
Here is my bitbucket-pipelines.yaml file:
# This is a sample build configuration for Python.
# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: python:3.6.4
pipelines:
default:
- step:
caches:
- pip
script: # Modify the commands below to build your repository.
- pip install pipenv
- pipenv install --dev --system --deploy
- export DB_USERNAME=example-user && export DB_PASSWORD=example-user
- python -c 'import os;print(os.environ.get("DB_PASSWORD"))'
- coverage run --source=predictor --omit=predictor/* -m unittest
- coverage report -m
services:
- mysql
definitions:
services:
mysql:
image: mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: 'database1'
MYSQL_USER: 'example-user'
MYSQL_PASSWORD: 'example-user'
I can confirm that the environment variable is printed. How can i debug the issue further?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.