Skip to content

Use CODEBUILD_BUILD_ID while running in codebuild #4292

@linyao-reevo

Description

@linyao-reevo

Subject

Guides

Description

In the page https://docs.cypress.io/guides/continuous-integration/aws-codebuild

The guide to run in codebuild is

phases:
  install:
    # ...
  build:
    commands:
      - npm start:ci &
      - npx cypress run --record --parallel --browser $CY_BROWSER --ci-build-id
        $CODEBUILD_INITIATOR --group "$CY_GROUP" --spec "$CY_SPEC" --config
        "$CY_CONFIG"

However it won't work if the codebuild is running in a pipeline, because the CODEBUILD_INITIATOR will become the codepipeline's id.

Suggest to change the variable to CODEBUILD_BUILD_ID.
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions