代码之家  ›  专栏  ›  技术社区  ›  Arthur Decker

如何使用circleci 2.1将应用程序部署到elastic beanstalk

  •  0
  • Arthur Decker  · 技术社区  · 5 年前

    但我在尝试部署时仍然会遇到此错误。

    ERROR: InvalidProfileError - The config profile (eb-cli) could not be found
    Error: 
    Exited with code exit status 4
    

    我甚至创建了一个脚本来复制我的aws证书,但似乎什么都没用

     AWS_CONFIG_FILE=~/.aws/config
    
        mkdir ~/.aws
        touch $AWS_CONFIG_FILE
        chmod 600 $AWS_CONFIG_FILE
    
        echo "[profile eb-cli]"                              > $AWS_CONFIG_FILE
        echo "aws_access_key_id=${AWS_ACCESS_KEY_ID}"         >> $AWS_CONFIG_FILE
        echo "aws_secret_access_key=${AWS_SECRET_ACCESS_KEY}" >> $AWS_CONFIG_FILE
    

    配置yaml

    version: 2
    jobs:
      deploy:
        docker:
          - image: circleci/buildpack-deps:stretch
        steps:
          - checkout
          - run: sudo apt-get -y -qq update --assume-yes
          - run: sudo apt-get install python-pip python-dev build-essential --assume-yes
          - run: sudo pip install awsebcli --upgrade
          - run : sudo eb deploy myApp-env
    workflows:
      version: 2
      build_and_test:
        jobs:
          - deploy
    

    .弹性豆茎/配置yml

    branch-defaults:
      develop:
        environment: myApp-env
      master:
        environment: myApp-env
    global:
      application_name: myApp
      default_platform: Docker 18.03.1-ce
      default_region: eu-west-2
      include_git_submodules: true
      instance_profile: null
      platform_name: null
      platform_version: null
      profile: eb-cli
      sc: git
    
    0 回复  |  直到 5 年前