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?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.