Skip to main content

GoCD Integration With HyperExecute


GoCD, short for "Go Continuous Delivery," is an open-source continuous integration and continuous delivery (CI/CD) server that helps automate and streamline the software development and release process. It is designed to facilitate the efficient and reliable delivery of software from development to production.

This document will show you how to integrate GoCD with HyperExecute to greatly shorten your test cycles.

How to Integrate with HyperExecute

Pre-requisite:

  • Download the GoCD Server and Agent and unzip the folder.

You can use your own project to configure and test it. For demo purposes, we are using the sample repository.

Sample repo

Download or Clone the code sample from the LambdaTest GitHub repository to run the tests on the HyperExecute.

Image View on GitHub

Step 1: Start the GoCD Server

  • Go to the gocd/bin folder and run the following commands:

    • To start the Server
    ./bin/go-server start
    • To start the Agent
    ./bin/go-agent start
  • Now type http://localhost:8153/go in your browser to open the GoCD GUI.

  • Click on the New Pipeline Button.

Image

Step 2: Configure the GoCD Pipeline

Part 1: Material

  • Select the Material Type. For the demo purposes, we will be using the Git.

  • Enter the Repository URL from which you want to set up the project.

  • Enter your Reposiroty branch name.

  • Enter the Username and Password of your GitHub. (It is required in case the access to the repo needed authentication).

Image

Part 2: Pipeline Name

  • Enter your Pipeline Name.

Part 3: Stage Details

A Stage is a group of Jobs and a Job is a work which needs to be executed.

  • Enter your Stage Details.
Image

Part 4: Job and Tasks

  • Enter the Job Name.

  • Enter the below mentioned script in the space provided.

curl -O https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute
chmod +x hyperexecute
./hyperexecute --user <your_username> --key <your_access_key> --config <your_yaml_file_name>

Since my default agent is mac I am using darwin CLI in the cURL command. Kindly change it according to your system default agent.

  • Mac -> darwin
  • Linux -> linux
  • Windows-> windows
  • Click on Save + Run This Pipeline button.
Image

Job Running

Now the Job is executed and running. You can check the status of Job in the:

  • GoCD GUI

    Image
  • GoCD Console

    Image
  • HyperExecute Dashboard

After the build is successful, go to your HyperExecute Dashboard and check the output of the triggered Job.

Image
  • Job Status Passed

Image

Sample Workflow File

<pipeline name="Download-and-Run-Hyperexecute">
<stage name="Download">
<job name="Download-Hyperexecute">
<run on="ubuntu" /> # Adjust for macOS if needed
<tasks>
<exec command="wget https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute" />
<exec command="chmod u+x hyperexecute" />
</tasks>
</job>
</stage>
<stage name="Run-Tests">
<job name="Run-Hyperexecute-Tests">
<run on="ubuntu" /> # Adjust for macOS if needed
<tasks>
<exec command="./hyperexecute --user <your_username> --key <your_access_key> --config <your_yaml_file_path>" />
</tasks>
</job>
</stage>
</pipeline>