在bitbucketstream水线文件中设置arangodb环境variables进行authentication

我正在使用CI上我正在使用bitbucketpipe道文件的应用程序。 为了做到这一点,我需要导入我的数据库泊坞窗图像(arangodb)并指定一些环境variables来设置validation方法,如下所述。 简短的故事,它可能是这些可能性之一:

  • ARANGO_RANDOM_ROOT_PASSWORD = 1
  • ARANGO_NO_AUTH = 1
  • ARANGO_ROOT_PASSWORD = somepassword

出于某种原因,使用两者之一运行pipe道首先发回错误:

您的bitbucket-pipelines.yml文件中的“环境”部分必须是地图。

我设法使用下面的文件中的环境variables来运行pipe道,但我可能想在某些时候改变其他方法。 我不确定这个问题实际上是以写入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