Continuous integration 用于在编译后Aws CodeBuild&;中替换txt的脚本;代码部署
我有一张CI/CD在Amazon上运行良好 假设我有一个简单的html和一个url alloger.test.com 当我将存储库合并到master时,有没有一种方法可以让CodeBuild和CodeDeploy的后期构建运行到所有文件中,以找到同源文件。替换为www 关键是,我不想手动更改所有文件以在同源中进行测试,然后再次手动替换以合并到主控…我希望同源可以正常工作,当我合并到主控时,它将在部署时替换URL 我知道正确的方法是在corret存储库中有正确的URL,但是为了方便测试,最好以另一种方式工作,不要太琐碎 “sed”shell命令可以工作吗?像这个例子 在后期构建部分会是这样的吗?如何在S3中指定正确的文件夹Continuous integration 用于在编译后Aws CodeBuild&;中替换txt的脚本;代码部署,continuous-integration,aws-code-deploy,aws-codepipeline,aws-codebuild,Continuous Integration,Aws Code Deploy,Aws Codepipeline,Aws Codebuild,我有一张CI/CD在Amazon上运行良好 假设我有一个简单的html和一个url alloger.test.com 当我将存储库合并到master时,有没有一种方法可以让CodeBuild和CodeDeploy的后期构建运行到所有文件中,以找到同源文件。替换为www 关键是,我不想手动更改所有文件以在同源中进行测试,然后再次手动替换以合并到主控…我希望同源可以正常工作,当我合并到主控时,它将在部署时替换URL 我知道正确的方法是在corret存储库中有正确的URL,但是为了方便测试,最好以另一
sed "s/homolog./www./g" *.html -i
我的BuildSpec非常简单:
version: 0.2
phases:
pre_build:
commands:
- echo Installing source NPM dependencies...
- npm install
build:
commands:
- cp dev-ops/config.production.js src/config.js
- export PUBLIC_URL=/app/
- npm run build
post_build:
commands:
- aws s3 sync site-beta s3://www.test.com/ --cache-control max-age=3600
- aws s3 sync build s3://www.test.com/app/ --cache-control max-age=3600
artifacts:
files:
- build/**/*