skip to Main Content

first of all, sorry, if my question is to broad…, but I’m looking for solution approaches, instead of asking exact questions.

Now, we are migrating our (c++) development into AWS (AWS CodeCommit, CodePipeline, etc).
The development workflow is very common: edit the code, build (the build executes UNIT Tests), and run integration test.

The integration test requires database, the running production process (single process application) and the test process.

Now, I have an AWS CodePipeline that is (in AWS CodePipeline stage order)

  1. Check out the source if changed (AWS CodeCommit)
  2. Build it and output the binaries (AWS CodeBuild)
  3. Create 2 docker images (for production process and for integration test process) and upload them to Amazon ECR (AWS CodeBuild)

The problem

is that I couldn’t found any suitable steps that the pipeline can trigger and and which step will start these containers and runs the integration tests (and of course in case of failure, raise an error on the pipeline too)

My initial

idea was to create an ECS Cluster with FARGATE task definition and the pipeline "executes" this task

So please help me how to achieve this goal (by completing my initial thought or proposing a new one)…

The important is that I want to be sure that if I submit a commit to the branch it will be built, unit tested and integration tested

Thank you

2

Answers


  1. AWS CodeBuild can run any script, not just build scripts. You should add another step to your pipeline that runs another CodeBuild step that runs your integration tests.

    Login or Signup to reply.
  2. I think you can store your code base to aws code commit and from there just trigger the lambda/ step function for unit testing, integration testing, etc.

    In lemon words all you can do is create dummy container that will run your test cases and you can use the deploy stage to do the deployment over your container or skip the last step.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search