是否有可能使构建阶段并行?今天,构建阶段在一个序列中构建和部署所有映像,这需要相当长的时间。如果每个映像将与其他映像并行构建(与部署阶段相同),这将节省大量时间。
发布于 2022-07-15 16:30:46
很抱歉没有及时答复,我们刚才不知怎么漏掉了你的问题。
部署阶段是并行运行的,除非您选择按照管道清单中的stages.deployments字段来部署它们。
至于构建阶段,感谢您的伟大建议--我们正在研究实现此更改;同时,您可以对您自己管道的构建规范进行更改,特别是在这个块中:
for env in $pl_envs; do
tag=$(sed 's/:/-/g' <<<"${CODEBUILD_BUILD_ID##*:}-${env}" | rev | cut -c 1-128 | rev)
for svc in $svcs; do
./copilot-linux svc package -n $svc -e $env --output-dir './infrastructure' --tag $tag --upload-assets;
if [ $? -ne 0 ]; then
echo "Cloudformation stack and config files were not generated. Please check build logs to see if there was a manifest validation error." 1>&2;
exit 1;
fi
done;
for job in $jobs; do
./copilot-linux job package -n $job -e $env --output-dir './infrastructure' --tag $tag --upload-assets;
if [ $? -ne 0 ]; then
echo "Cloudformation stack and config files were not generated. Please check build logs to see if there was a manifest validation error." 1>&2;
exit 1;
fi
done;
done;https://stackoverflow.com/questions/72375124
复制相似问题