我正在努力在我正在使用bitbucket管道文件的应用程序上使用CI。 为此,我需要导入我的数据库docker镜像(arangodb)并指定一些环境变量来设置here所述的身份验证方法。简短的故事,它可能是其中一种可能性:
出于某种原因,使用两者中的任何一个运行管道首先发回错误:
bitbucket-pipelines.yml文件中的'environment'部分必须是 一张地图。
我设法使用下面文件中的环境变量来运行管道,但我可能希望在某些时候更改其他方法。我不确定问题实际上是写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'
答案 0 :(得分:0)
解决方案:
# 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