【发布时间】:2020-08-21 21:16:54
【问题描述】:
我是 YAML 文件的新手。我想每次都将时间戳附加到 S3 存储桶文件夹,以便每个构建都是唯一的。在 post_build 中,我将时间戳附加到 S3 存储桶,如下所示。当触发代码管道时,所有文件都存储到 S3 存储桶内部文件夹,但没有生成带有时间戳的文件夹。 s3://${S3_BUCKET}/Inhouse/${'date'}
Version: 0.2
env:
variables:
S3_BUCKET: Inhouse-market-dev
phases:
install:
runtime-versions:
nodejs: 10
commands:
- npm install
- npm install -g @angular/cli
build:
commands:
- echo Build started on `date`
post_build:
commands:
- aws s3 cp . s3://${S3_BUCKET}/Inhouse/${'date'} --recursive --acl public-read --cache-control "max-age=${CACHE_CONTROL}"
- echo Build completed on `date`
【问题讨论】:
标签: amazon-web-services yaml aws-codepipeline