我正在使用位桶管道文件的应用程序上使用CI。
为此,我需要导入数据库docker镜像(arangodb)并指定一些环境变量以按照here所述设置身份验证方法。简而言之,它可能是以下可能性之一:
出于某种原因,先运行两个管道中的任何一个来运行管道会发回错误:
The 'environment' section in your bitbucket-pipelines.yml file must be a map.
我设法使用下面文件中的环境变量来使管道运行,但有时我可能想更改其他方法。我不确定写ARANGO_ROOT_PASSWORD到底是什么问题:”会发回相同的先前错误。任何帮助,将不胜感激。
# 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:2.7
pipelines:
branches:
'{dev,master}':
- step:
script:
- python setup.py develop
- python ./server/kernel/setup.py
- python ./server/tests/jsonLoginRegister_tests.py
services:
- arangodb
definitions:
services:
arangodb:
image: arangodb/arangodb
environment:
ARANGO_ROOT_PASSWORD: '1'
最佳答案
解决方案:
# 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:2.7
pipelines:
branches:
'{dev,master}':
- step:
script:
- python setup.py develop
- python ./server/kernel/setup.py
- python ./server/tests/common_tests.py
services:
- arangodb
definitions:
services:
arangodb:
image: arangodb/arangodb
environment:
ARANGO_NO_AUTH: 1
关于python-2.7 - 设置arangodb环境变量以在bitbucket管道文件中进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47244123/