amazon-elastic-beanstalk - 使用 bitbucket CI/CD 在 Elastic beanstalk 环境中发布部署命令
问题描述
我使用 bitbucket 作为我的 CI/CD 来部署到弹性 bean 环境。我的示例配置文件如下所示
image: atlassian/default-image:2
pipelines:
branches:
dev:
- step:
name: "Zip File"
script:
- apt-get update && apt-get install zip
- apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- zip app.zip -r .
artifacts:
- app.zip
- step:
name: "Deploy to dev env"
deployment: dev
caches:
- node
script: # Modify the commands below to build your repository.
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.5
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'ap-xxxxx-1'
APPLICATION_NAME: 'exxxxs-xxxx-xxx'
ENVIRONMENT_NAME: 'xxx-xxx-x-xxxxxx'
S3_BUCKET: 'xxxxxxxxx'
ZIP_FILE: "app.zip"
现在我需要在弹性 bean 环境创建的 EC2 实例之后使用 Curl 安装 Google chrome。我怎样才能添加这样的命令。我尝试在我的部署步骤之后向我的 bitbucket yaml 文件添加一个步骤,但出现错误
- step:
name: "Install Google Chrome"
script:
- apt update && apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- curl https://intoli.com/install-google-chrome.sh | bash
添加命令的正确方法是什么?
解决方案
推荐阅读
- python - 贪婪的正则表达式向后看
- python-3.x - 如何使用 GlobalAveragePool 层作为模型的输出
- javascript - 未添加 Vue.js 过渡组 *-move 类
- ios - 无法加载网页并出现错误:操作无法完成。NSURLErrorDomain 错误 -999 将 Ionic 应用程序部署到 iOS 设备
- sql - 根据列值查找第二行数据,如果不可用则打印 NULL
- r - 将字符“pi”转换为值 pi
- python-3.x - 如何转换数据框中的所有浮点列,但第一列除外?
- vue.js - Vue cli 图像无法使用 webpack 加载
- c# - VB和C#之间的绑定问题
- spring - 转换对象 MethodSignature 时出错。春季AOP