PageSourceSearch

https://docs-production-katalon.netlify.app/assets/js/569dc829.38f6e360.js

js docs-production-katalon.netlify.app collected 2026-10-03 10:42:51 UTC 15,113 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[11603],{28453:(e,t,s)=>{s.d(t,{R:()=>n,x:()=>r});var a=s(96540);const o={},l=a.createContext(o);function n(e){const t=a.useContext(l);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:n(e.components),a.createElement(l.Provider,{value:t},e.children)}},68417:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"integrations/cicd-integrations/google-cloud-integration","title":"Google Cloud integration","description":"Cloud Build is a service on the Google Cloud Platform (GCP) that automates the build, test, and deployment processes for projects. For more details, refer to the Cloud Build documentation.","source":"@site/docs/katalon-studio/integrations/cicd-integrations/google-cloud-integration.md","sourceDirName":"integrations/cicd-integrations","slug":"/integrations/cicd-integrations/google-cloud-integration","permalink":"/katalon-studio/integrations/cicd-integrations/google-cloud-integration","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1778734869000,"frontMatter":{"title":"Google Cloud integration"},"sidebar":"katalon-studio","previous":{"title":"GitLab Integration in Katalon Studio and Katalon Runtime Engine","permalink":"/katalon-studio/integrations/cicd-integrations/gitlab-integration-katalon-studio-runtime-engine-kre"},"next":{"title":"Harness integration","permalink":"/katalon-studio/integrations/cicd-integrations/harness-integration"}}');var o=s(74848),l=s(28453),n=s(86025);const r={title:"Google Cloud integration"},i=void 0,c={},d=[{value:'<a class="anchor_top_offset"></a>Configure the <code class="ph codeph">cloudbuild.yml</code>  file',id:"configure-the-cloudbuildyml--file",level:2},{value:'<a class="anchor_top_offset"></a>Create a Google Cloud secret for Katalon API key',id:"create-a-google-cloud-secret-for-katalon-api-key",level:2},{value:'<a class="anchor_top_offset"></a>Create and test your build trigger',id:"create-and-test-your-build-trigger",level:2},{value:'<a class="anchor_top_offset"></a>Create a trigger',id:"create-a-trigger",level:3},{value:'<a class="anchor_top_offset"></a>Test the trigger',id:"test-the-trigger",level:3},{value:'<a class="anchor_top_offset"></a>View build results',id:"view-build-results",level:3}];function h(e){const t={h2:"h2",h3:"h3",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["Cloud Build is a service on the Google Cloud Platform (GCP) that automates the build, test, and deployment processes for projects. For more details, refer to the ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://cloud.google.com/build/docs",target:"_blank",children:"Cloud Build documentation"}),"."]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"Integrating Katalon with Cloud Build helps streamline your CI/CD pipeline and ensures automatic execution of Katalon test scripts whenever changes occur in the source code. "}),"\n",(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["This tutorial shows you how to configure the ",(0,o.jsx)("code",{className:"ph codeph",children:"cloudbuild.yml"})," file, create a Google Cloud secret, and set up a Cloud Build trigger.",(0,o.jsxs)("div",{className:"note note note_note",children:[(0,o.jsx)("span",{className:"note__title",children:"Note:"})," ",(0,o.jsx)("ul",{className:"ul",children:(0,o.jsx)("li",{className:"li",children:(0,o.jsxs)("p",{className:"p",children:["Find the sample project in our GitHub repository: ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://github.com/katalon-studio-samples/ci-samples",target:"_blank",children:"katalon-studio-samples/ci-samples"}),"."]})})})]}),(0,o.jsxs)("div",{className:"note important note_important",children:[(0,o.jsx)("span",{className:"note__title",children:"Important:"})," ",(0,o.jsxs)("ul",{className:"ul",children:[(0,o.jsxs)("li",{className:"li",children:["A valid Katalon API key. See ",(0,o.jsx)("a",{className:"xref",href:"#",children:"Generate a Katalon API Key"}),"."]}),(0,o.jsxs)("li",{className:"li",children:["A GCP project. See Google Worksp
1ace documentation: ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://developers.google.com/workspace/guides/create-project",target:"_blank",children:"Create a Google Cloud project"}),"."]}),(0,o.jsxs)("li",{className:"li",children:["Google Cloud Build API enabled for your Google Cloud project. See Google Cloud documentation: ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://cloud.google.com/endpoints/docs/openapi/enable-api",target:"_blank",children:"Enabling an API in your Google Cloud project"}),"."]}),(0,o.jsxs)("li",{className:"li",children:["Secret Manager API enabled for your GCP project. See Google Cloud documentation: ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://cloud.google.com/build/docs/securing-builds/use-secrets",target:"_blank",children:"Use secrets from Secret Manager"}),"."]})]})]}),"After setting up the GCP project, you need to configure the following components:",(0,o.jsxs)("ul",{className:"ul",children:[(0,o.jsxs)("li",{className:"li",children:["A ",(0,o.jsx)("code",{className:"ph codeph",children:"cloudbuild.yml"})," file at the root directory of your repository that contains the build configuration for Cloud Build."]}),(0,o.jsx)("li",{className:"li",children:"A Google Cloud secret to store your Katalon API key."})]})]}),"\n",(0,o.jsxs)(t.h2,{id:"configure-the-cloudbuildyml--file",children:[(0,o.jsx)("a",{id:"task-4911",class:"anchor_top_offset"}),"Configure the ",(0,o.jsx)("code",{xmlns:"http://www.w3.org/1999/xhtml",className:"ph codeph",children:"cloudbuild.yml"}),"  file"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"shortdesc",children:["The  ",(0,o.jsx)("code",{className:"ph codeph",children:"cloudbuild.yml"})," file  specifies the instructions for Cloud Build to automate the building, testing, and deploying of your Katalon project."]}),"\n",(0,o.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:[(0,o.jsxs)("p",{className:"p",children:["Here in the sample GitHub repository, we have the following  ",(0,o.jsx)("code",{className:"ph codeph",children:"cloudbuild.yml"})," file:"]}),(0,o.jsx)("pre",{className:"pre codeblock",children:(0,o.jsxs)("code",{children:["steps:","\n","- name: 'docker'","\n","  ","args: ['pull', 'katalonstudio/katalon']","\n","- name: 'docker'","\n","  ","entrypoint: 'sh'","\n","  ","args: ['-c', 'docker run -t --rm -v /workspace:/tmp/project katalonstudio/katalon katalonc.sh -projectPath=/tmp/project -browserType=\"Chrome\" -retry=0 -retryStrategy=immediately -testSuiteCollectionPath=\"Test Suites/Simple Test Suite Collection\" --config -webui.autoUpdateDrivers=true -apiKey=$$KATALON_API_KEY']","\n","  ","secretEnv: ['KATALON_API_KEY']","\n","availableSecrets:","\n","  ","secretManager:","\n","  ","- versionName: projects/$PROJECT_ID/secrets/KATALON_API_KEY/versions/1","\n","    ","env: 'KATALON_API_KEY'","\n"]})}),(0,o.jsx)("p",{className:"p",children:"In the build configuration file, there are two build steps:"})]}),"\n",(0,o.jsxs)("ol",{xmlns:"http://www.w3.org/1999/xhtml",className:"ol steps",children:[(0,o.jsxs)("li",{className:"li step stepexpand",children:[(0,o.jsxs)("span",{className:"ph cmd",children:["Use a ",(0,o.jsx)("code",{className:"ph codeph",children:"docker"})," cloud builder to pull the       ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonstudio/katalon"})," Docker image from Docker       Hub."]}),(0,o.jsx)("div",{className:"itemgroup info",children:(0,o.jsx)("ul",{className:"ul",children:(0,o.jsxs)("li",{className:"li",children:["In the ",(0,o.jsx)("strong",{className:"ph b",children:"args"})," field, specify an image version using the syntax           ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonstudio/katalon:<version_tag>"}),". For example,           ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonstudio/katalon:8.1.2"}),"."]})})})]}),(0,o.jsxs)("li",{className:"li step stepexpand",children:[(0,o.jsxs)("span",{className:"ph cmd",children:["Use a ",(0,o.jsx)("code",{className:"ph codeph",children:"docker"})," cloud builder to run the       ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonstudio/katalon"})," image as a container and execute       the tests stored in your GitHub repository."]}),(0,o.jsxs)("ol",{type:"a",className:"ol substeps",children:[(0,o.jsx)("li",{className:"li substep",children:(0,o.jsxs)("span",{className:"ph cmd",children:["In the ",(0,o.jsx)("strong",{className:"ph b",children:"args"})," field, set your ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonc"})," commands.  For a  list of ",(0,o.jsx)("code",{className:"ph codeph",children:"katalonc"}),"           supported arguments, refer to ",(0,o.jsx)("a",{className:"xref",href:"#",children:"Command             syntax"}),"."]})}),(0,o.jsx)("li",{className:"li substep",children:(0,o.jsxs)("span",{className:"ph cmd",children:[" In the ",(0,o.jsx)("strong",{className:"ph b",children:"secretEnv"})," field, input the           environment variables, such as ",(0,o.jsx)("code",{className:"ph codeph",children:"KATALON_API_KEY"}),", to  use the           secret named ",(0,o.jsx)("code",{className:"ph codeph",children:"KATALON_API_KEY"}),"."]})})]})]})]}),"\n",(0,o.jsxs)(t.h2,{id:"create-a-google-cloud-secret-for-katalon-api-key",children:[(0,o.jsx)("a",{id:"id_3-k4pup1gm",class:"anchor_top_offset"}),"Create a Google Cloud secret for Katalon API key"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["As specified in the build configuration file, the ",(0,o.jsx)("code",{className:"ph codeph",children:"KATALON_API_KEY"})," secret represents your Katalon API key. You need to define the secret for your project."]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["For detailed instructions on creating a Google Cloud secret, refer to this Google Cloud guide: ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets",target:"_blank",children:"Create a secret"}),"."]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/google-cloud-build-integration/GCP-Secret-key.png"),alt:"Google Cloud Platform secret manager"}),(0,o.jsx)("br",{}),(0,o.jsx)("br",{})]}),"\n",(0,o.jsxs)(t.h2,{id:"create-and-test-your-build-trigger",children:[(0,o.jsx)("a",{id:"id_4-1od4rl36",class:"anchor_top_offset"}),"Create and test your build trigger"]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"A Cloud Build trigger automatically starts a build whenever you   make changes to your source code. You need to connect Cloud Build   to the sample GitHub repository and then create a trigger that   automatically monitors changes and builds code."}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["For detailed instructions on connecting to repositories and   building triggers, see ",(0,o.jsx)("a",{className:"xref j-external-link",href:"https://cloud.google.com/build/docs/automating-builds/create-manage-triggers",target:"_blank",children:"Create     and manage build triggers"}),"."]}),"\n",(0,o.jsxs)(t.h3,{id:"create-a-trigger",children:[(0,o.jsx)("a",{id:"id_5-hbqwisp8",class:"anchor_top_offset"}),"Create a trigger"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["In our example, a trigger is created to build the code automatically whenever a ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Push to branch"})," event occurs."]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/google-cloud-build-integration/GCP-Created-trigger.png"),alt:"Google Cloud Platform trigger created"}),(0,o.jsx)("br",{}),(0,o.jsx)("br",{})]}),"\n",(0,o.jsxs)(t.h3,{id:"test-the-trigger",children:[(0,o.jsx)("a",{id:"id_6-suq2a59e",class:"anchor_top_offset"}),"Test the trigger"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["To test the trigger, you can start the build manually by selecting ",(0,o.jsx)("span",{className:"ph uicontrol",children:"RUN"})," on the trigger."]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/google-cloud-build-integration/GCP-Run-trigger.png"),alt:"Google Cloud Platform run trigger"}),(0,o.jsx)("br",{}),(0,o.jsx)("br",{})]}),"\n",(0,o.jsxs)(t.h3,{id:"view-build-results",children:[(0,o.jsx)("a",{id:"id_7-9fzmbfnn",class:"anchor_top_offset"}),"View build results"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["To view the build results, go to the ",(0,o.jsx)("span",{className:"ph uicontrol",children:"History"})," tab and select the latest build."]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/google-cloud-build-integration/GCP-History-tab.png"),alt:"Google Cloud Platform history tab"}),(0,o.jsx)("br",{}),(0,o.jsx)("br",{})]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"The build details are shown as follows:"}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/google-cloud-build-integration/GCP-Build-detail
1s.png"),alt:"Google Cloud Platform build details"}),(0,o.jsx)("br",{}),(0,o.jsx)("br",{})]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"The code build includes two steps: pulling the Docker image and executing the tests in a container."}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["To view test reports in TestOps, enable Katalon True Platform integration in your project. See ",(0,o.jsx)("a",{className:"xref",href:"/katalon-studio/get-started/workspace-settings/integrate-katalon-platform-with-katalon-studio",children:"this guide"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.