在bitbucket中实现CI / CD管道

时间:2019-12-17 10:34:06

标签: amazon-web-services asp.net-core bitbucket amazon-elastic-beanstalk bitbucket-pipelines

我正在尝试在该项目的bitbucket中实现CI / CD管道。基本上,每当新代码被推送到“ XamDev”分支时,我都希望使用bitbucket CI / CD将Web API部署在AWS Elastic beantalk上。

下面是我配置了所有aws设置的相同的bitbucket-pipelines.yml。我已经在Visual Studio解决方案中添加了此文件。

# This is a sample build configuration for .NET Core.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw 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: microsoft/dotnet:sdk

pipelines:
  default:
    script:
          - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
  branches:
    XamDev:
    - step:
        caches:
          - dotnetcore
        script: # Modify the comma`nds below to build your repository.
          - pipe: atlassian/aws-elasticbeanstalk-deploy:0.5.4
            variables:
              AWS_ACCESS_KEY_ID: '<Access_Key>'
              AWS_SECRET_ACCESS_KEY: '<Secret_Key>'
              AWS_DEFAULT_REGION: 'us-east-1'
              APPLICATION_NAME: '<ApplicationName>' // elastic beanstalk application name provided 
              ENVIRONMENT_NAME: '<EnvironmentName>' // elastic beanstalk environment provided
              ZIP_FILE: 'myfile.zip'
              # S3_BUCKET: '<string>' # Optional.
              # VERSION_LABEL: '<string>' # Optional.
              # DESCRIPTION: '<string>' # Optional.
              # WAIT: '<boolean>' # Optional.
              # WAIT_INTERVAL: '<integer>' # Optional.
              # COMMAND: '<string>' # Optional.
              # DEBUG: '<boolean>' # Optional.

因此,在提交代码之后,我看不到从bitbucket运行任何管道,也没有看到使用弹性beantalk的aws部署开始。

当我检查我的bitbucket帐户并分支时,它没有显示已配置任何管道。我正在将VS 2019与.net核心网络api一起使用。

对此有任何帮助!

0 个答案:

没有答案