我正在将 Bitbucket 管道与 PosgreSQL 一起用于 CI/CD。根据此文档, PostgreSQL 服务是这样描述的bitbucket-pipelines.yml:
definitions:
services:
postgres:
image: postgres:9.6-alpine
Run Code Online (Sandbox Code Playgroud)
直到现在它工作得很好。但是我所有最新的管道都失败了,并出现以下错误:
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD for the superuser. Use
"-e POSTGRES_PASSWORD=password" to set it in "docker run".
You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections
without a password. This is *not* recommended. See PostgreSQL
documentation about "trust":
https://www.postgresql.org/docs/current/auth-trust.html
Run Code Online (Sandbox Code Playgroud)
我该如何解决?bitbucket-pipelines.yml文件中没有任何更改,这可能是此类错误的原因..