gpt4 book ai didi

python-2.7 - 设置arangodb环境变量以在bitbucket管道文件中进行身份验证

转载 作者:行者123 更新时间:2023-12-02 19:34:35 40 4
gpt4 key购买 nike

我正在使用位桶管道文件的应用程序上使用CI。
为此,我需要导入数据库docker镜像(arangodb)并指定一些环境变量以按照here所述设置身份验证方法。简而言之,它可能是以下可能性之一:

  • ARANGO_RANDOM_ROOT_PASSWORD = 1
  • ARANGO_NO_AUTH = 1
  • ARANGO_ROOT_PASSWORD =一些密码

  • 出于某种原因,先运行两个管道中的任何一个来运行管道会发回错误:

    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/

    40 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com