This Release Pipeline demo will go over:
- A task that builds an Android app to an APK file stored in Azure DevOps.
- For simplicity, we will skip the app building process and use an existing APK file.
- A task to execute an automation test on a Kobiton device using the built APK file.
- (Optional) A task to upload a new version of the app from APK file.
An Artifact will be added the APK file. You can learn more about Artifacts on the Azure DevOps Documentation. There are many ways to create an artifact, but in this sample we will create a simple artifact containing the test APK file.
- On the left sidebar, click Repos > Files
- On the Clone to you computer section:
- Click the Generate Git Credentials button to display User Name and Password that will be used in a later step.
- Copy the URL below:
- On your local machine, open Terminal and enter:
git clone GIT_URL
Replace GIT_URL with the URL above, depending on your project setup. If prompted during the cloning process, use the Username and Password from step 2.
In your local machine, copy the APK file to the cloned repository. Then cd to the repository and type this line in your terminal: git add . && git commit -m "Upload apk" && git push
In the example below, we copied the ApiDemos-debug.apk file in the /Downloads folder in to the Git repository. You can access and download the sample app here.
Back to your Azure DevOps web page, confirm that the uploaded file is listed on your Azure DevOps Project.
- Create a Release Pipeline. On your Azure DevOps Project, click on the Release Pipeline page.
- In this document, we create a new Release pipeline, but an existing pipeline can be reused. Click the New pipeline button to create a new release pipeline.
- On the right sidebar, click Empty job to create an empty Release Stage.
- To add an Artifact, click on the Add an artifact button.
- To add an Artifact, click +Add an artifact.
- Select Azure Repository and enter the required information. In the image below, newProject is the Git repository used to add the sample APK file.
To add the Artifact to the release pipeline, click Add. Once an Artifact has been added, navigate to Stage and click 1 job, 0 task.
To add a new Release Task, on the Stage Configuration screen > Agent Job click on the + icon.
In the search box, enter Kobiton to display Kobiton's two release task.
Click on Kobiton Automation Test Executor to add the task to your release.
The next two sections will guide you on how to use these Kobiton Release Tasks.