Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

592
Views
How to invoke a pipeline based on another pipeline success using AWS CodeCommit, CodeBuild, CodePipeline

The desired behavior is as follows:

  • Push code change
  • Run unit tests for each Serverless component
  • Provided all tests are successful, deploy the components into Staging environment and mark build as successful
  • Listen to this change and run acceptance tests suite using Gherkin
  • Provided all tests are successful, deploy the components into UAT/Prod environment and mark build as successful

The desired solution would have two pipelines, the second one triggered by the first one's success.

If you have any other ideas, I'd be delighted to hear!

Thanks in advance

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

The solution I propose for a second pipeline trigger would be the following:

  • Have the second pipelines source as S3 (not CodeCommit). This will ensure that only when a specifically named file (object key) is pushed to Amazon S3 will this pipeline start.
  • At the end of the first CodePipeline add a Lambda function, by this point everything must have been successful to have triggered this.
  • Have that Lambda copy the artifact you build for your first pipeline and place it in the bucket with the key referenced in the second buckets source.

To keep things clean use a seperate bucket for each pipeline.

over 4 years ago · Santiago Trujillo Report

0

Assuming both CodePipelines are running in the same account. You can add "post_build" phase in your buildspec.yml.

In the post_build phase you can trigger the second CodePipeline using AWS SDK commands.

  build:
        commands:
            # npm pack --dry-run is not needed but helps show what is going to be published
            - npm publish
    post_build:
        commands:
            - aws codepipeline start-pipeline-execution --name <codepipeline_name>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!