About Buildkite
Buildkite is a platform for running fast, secure, and scalable continuous integration pipelines on your own infrastructure.
Kobiton Plugins
Kobiton Plugins can be found here: Buildkite Plugins
You can add Kobiton plugin(s) to your YAML pipeline in order to:
-
upload your app to Kobiton app repo
-
execute test on Kobiton device
How to use
Precondition: You should already have your Buildkite pipeline set up. Please also refer to Defining Your Pipeline Steps
Kobiton App Upload
To upload your application to Kobiton App Repo, add the following to your pipeline.yml
:
steps:
- label: "Kobiton App Upload"
plugins:
- kobiton/kobiton-app-upload#v1.0.0:
app-name: '<app-name>'
app-path: '<path-to-your-app>'
app-type: '<apk or ipa>'
kobiton-app-id: 'your-kobiton-app-id'
kobiton-app-access: 'private'
kobiton-username: '<your-kobiton-username>'
kobiton-api-key: '<your-kobiton-api-key>'
app-name (required) |
Title of the app being built, for example |
app-path (required) |
Path to the app .apk or .ipa file, for example |
app-type |
|
kobiton-app-id |
App ID in Kobiton, use this in case you want to upload new version of an existing app in Kobiton, for example Leave bank if you’re uploading new app |
kobiton-app-access |
use or |
kobiton-username |
Kobiton Username to upload to Kobiton, for example |
kobiton-api-key |
API key to access Kobiton API, for example To get your Kobiton API Key, please follow instructions at IV. Configure Test Script for Kobiton section on our blog |
For example: This will upload a new app version to app ID = 294808 and this app is private.
Once you’re done adding the plugin to your pipeline, click on “Save and Build”, then click “Create Build” to proceed.
(Optional) Once the pipeline completes running, you can go to Kobiton App Repo to double check your new application/new application version.
Kobiton Execute Test
To execute your test with Kobiton Executor, add the following to your pipeline.yml:steps:
- label: "Kobiton Execute Test"
plugins:
- kobiton/kobiton-execute-test#v1.0.0:
kobi-username: 'your kobiton username'
kobi-api-key: "your kobiton api key"
executor-url: 'https://executor-demo.kobiton.com'
executor-username: 'your kobiton executor server username'
executor-password: "your kobiton executor server password"
git-repo-url: 'https://github.com/Nhattd97/azure-devops-sample-java-prod.git'
git-repo-branch: 'master'
git-repo-ssh-key: ''
app-id: 'kobiton-store:91041'
root-directory: "/"
command: 'mvn test'
device-name: 'Galaxy S10'
device-platform-version: '10'
use-custom-device: 'false'
device-platform: 'android'
wait-for-execution: 'true'
log-type: 'combined'
kobi-username (required) kobi-api-key (required) |
To get your Kobiton Username and API Key, please follow instructions at IV. Configure Test Script for Kobiton section on our blog) |
executor-url (required) executor-username (required) executor-password (required) |
We will provide you credentials to access our TestNG Execution Server. This will be used to execute your automation test script. |
git-repo-url (required) git-repo-branch (required) git-repo-ssh-key |
You need to prepare your automation test project in a Git-based repository. For your security, we highly recommend setting your Git repository to Private and prepare an SSH key for it. If you do not know how to authenticate the key with Git, please follow the guide from Github create SSH key instruction and Github adding the key to account instruction.
|
app-id |
You can retrieve app-id from App Repo on Portal. Reference: https://support.kobiton.com/hc/en-us/articles/360056028911-Managing-Applications-#app-tiles-0-0 |
root-directory (required) command (required) |
Input the root directory of your Git repo and the command lines to install dependencies and execute your automation test script. These commands will run from the root directory of your Git repository. |
use-custom-device |
If you haven’t set the device information in your script, set this to “true” to choose a device to execute your test scrip |
device-name device-platform-version device-platform |
if above config is true, provide the info of the device you want to use to run the test |
wait-for-execution |
Set to “true” if your want the release pipeline to wait until your automation testing is completed or failed, then print out the console log and test result. If it’s set to “false”, the release pipeline will continue to the next step. The execution job ID of this task will be printed, but not the console logs or TestNG report URL. |
log-type |
Your desired log type to be showed. Choose |
Example:
Once you’re done adding the plugin to your pipeline, select “Save and Build”, then click “Create Build” to proceed.