Skip to main content

Jenkins

Introduction

You can set up a test CI/CD environment by integrating with Jenkins.

Prerequisites

This documentation assumes that a routine has already been created for integration with Jenkins. If you haven't created a routine yet, refer to Creating a Routine.

Token Issuance

1. Go to the Dogu project page and navigate to the Settings tab.

2. Click the Show Token button and copy the Project Access Token.

Plugin Installation

1. Plugin Management > Available Plugins > Search for Dogu Integration Plugin

2. Confirm Plugin Installation

Adding Credentials

1. Jenkins > Credentials > System > Global credentials (unrestricted) > Add Credentials

Select Kind: Dogu Access Token and enter ID, Description, and Dogu Access Token.

ID: Used as a credential identifier.
Description: Used as a credential description.
Dogu Access Token: Paste the Token copied from Token Issuance.

Freestyle Project

1. Jenkins Dashboard > New Item > Freestyle project

Uploading the App

1. Add build step > Select Upload application to Dogu.

2. Configure the Build Step

3. Click Build Now to run the Build.

4. Verify the app upload.

Running a Routine

1. Add build step > Select Run Dogu Routine.

2. Configure the Build Step

Enter Project ID, Routine ID, and Credential ID.

3. Click Build Now to run the Build.

4. Confirm the completion of the routine run.

Once the routine is complete, you can check the detailed report by using the URL displayed in the Console Output.

Pipeline

1. Jenkins Dashboard > New Item > Pipeline

Uploading the App

1. Create a Pipeline Script for App Upload

pipeline {
agent any
stages {
stage('Upload Application') {
steps {
doguUploadApplication(applicationPath: '/Users/dogu/warehouseinvasion.apk', projectId: '7ce0c78c-8d47-4b3f-a0ec-7402d14a5c08', credentialsId: 'Simple Project Access Token')
}
}
}
}

2. Run the Pipeline

3. Verify the app upload.

Running a Routine

1. Create a Pipeline Script for Routine Execution

pipeline {
agent any
stages {
stage('Run Routine') {
steps {
doguRunRoutine(projectId: '7ce0c78c-8d47-4b3f-a0ec-7402d14a5c08', routineId: '88db71bc-f6d8-4a20-8e92-50fc1477a3da', credentialsId: 'Simple Project Access Token')
}
}
}
}

2. Run the Pipeline

3. Confirm the completion of the routine run.

Once the routine is complete, you can check the detailed report by using the URL displayed in the Console Output.

References