Skip to content

AWS CodePipeline

AWS CodePipeline is a fully managed continuous delivery service that runs the build, test and deploy phases of your release process on every code change. You can trigger CloudQA tests from inside it. See CI/CD integrations for the variables.

  1. In AWS CodeBuild, create a new project with these settings:

    • Source: No Source
    • Environment: Managed image
    • Operating system: Amazon Linux 2
    • Runtime: Standard
    • Image: aws/codebuild/amazonlinux2-x86_64-standard:2.0, using the latest image for that runtime
    • Environment type: Linux
    • Service role: create a new role, or choose one that has CodeBuild and CodePipeline permissions

    CodeBuild source and image selection CodeBuild environment settings

  2. In the Buildspec section, switch to the editor and paste this:

    version: 0.2
    phases:
    install:
    commands:
    - yum install -y jq
    pre_build:
    commands:
    - curl -O https://doc.cloudqa.io/files/cloudqa-bash.sh
    build:
    commands:
    - bash cloudqa-bash.sh

    The buildspec editor

  3. Create the build project.

  1. Open your pipeline and select Edit.

  2. Add a stage named Web-Testing, then add an action group to it.

  3. Name the action Trigger-CloudQA-TestSuite.

  4. Under Test, set the action provider to AWS CodeBuild.

    Choosing the test action provider

  5. Set the input artifact to BuildArtifact and choose the CodeBuild project you created.

    Choosing the input artifact and project

  6. Add the environment variables the suite needs:

    • CLOUDQA_SUITE_ID: in CloudQA, open Test Suites, select the more-options menu in the Actions column and choose Details.
    • CLOUDQA_API_KEY: find it on the My Account page in CloudQA.

    The environment variables

  7. Select Done, then save the pipeline.