Skip to content

Google Cloud Build

Google Cloud Build runs the build, test and deploy phases of your delivery process on every code change. You can invoke CloudQA tests from it. See CI/CD integrations for the variables.

  1. In Google Cloud, create a build trigger named Trigger-CloudQA-Tests.
  2. Choose a region.
  3. Choose the event that should start the CloudQA tests.
  4. Choose the source repository to build when the trigger runs.
  5. For configuration, choose Cloud Build configuration file (yaml or json).
  6. For location, choose Inline and paste the configuration below.
  7. Replace the placeholder substitution values, then save the trigger.
steps:
- name: ubuntu
entrypoint: bash
args:
- -c
- |
apt-get update && apt-get install -y curl jq
curl -O https://doc.cloudqa.io/files/cloudqa-bash.sh
bash cloudqa-bash.sh
env:
- CLOUDQA_API_KEY=${_CLOUDQA_API_KEY}
- CLOUDQA_SUITE_ID=${_CLOUDQA_SUITE_ID}
- CLOUDQA_BROWSER=${_CLOUDQA_BROWSER}
- CLOUDQA_VARIABLES=${_CLOUDQA_VARIABLES}
- CLOUDQA_BUILD_TAG=${_CLOUDQA_BUILD_TAG}
- CLOUDQA_BASE_URL=${_CLOUDQA_BASE_URL}
- CLOUDQA_SEQUENTIAL_EXECUTION=${_CLOUDQA_SEQUENTIAL_EXECUTION}
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_CLOUDQA_SUITE_ID: "<TestSuite ID>"
_CLOUDQA_BROWSER: "Chrome"
_CLOUDQA_API_KEY: "<API key>"
_CLOUDQA_VARIABLES: "var1=val1,var2=val2"
_CLOUDQA_BUILD_TAG: "<Build ID>"
_CLOUDQA_BASE_URL: "<Application Start URL>"
_CLOUDQA_SEQUENTIAL_EXECUTION: "false"