1
votes

I have a codepipeline which trigger a few codebuild projects in different stage. In my codebuild project i have this configuration to

#codebuild.yml

Artifacts:
        Type: CODEPIPELINE
...
Source:
        Type: CODEPIPELINE
        BuildSpec: buildspec.yml

# buildspec.yml

version: 0.2
phases:
   ...
artifacts:
                name: test-result
                files:
                  - '**/*'
                  - '*'

I this configuration it specifies the artifact and use CODEPIPELINE as artifact type. so in codepipeline, how can I upload them to s3 bucket?

What I can think of is to write another codebuild project and use aws s3 command line to upload the files. But it is too manual. Is there an automatic way to do the job?

The build artifact includes test results and I'd like to upload the test results regardless previous failure or not. Is it possible to achieve this in codepipeline?

1

1 Answers

2
votes

how can I upload them to s3 bucket?

There are two ways. One you already pointed out - use CB action (same or different) to copy files to S3 using AWS CLI.

Second, is to use S3 deploy action. This allows you to deploy zipped or unzipped artifact to your destination bucket.