Create a release pipeline

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.

  1. On the left sidebar, click Repos > Files

    Click Repos, then Files

  2. On the Clone to your computer section:

    1. Click the Generate Git Credentials button to display User Name and Password that will be used in a later step.

    2. Copy the URL below:

      https://AZURE_ORG_NAME@dev.azure.com/AZURE_ORG_NAME/AZURE_PROJECT_NAME/_git/AZURE_PROJECT_NAME
    3. On your local machine, open Terminal and enter: git clone GIT_URL

    4. 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.

      Use the username and password from step 2

    5. 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

    6. 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.

      Copied the ApiDemos-debug

    7. Back to your Azure DevOps web page, confirm that the uploaded file is listed on your Azure DevOps Project.

      confirm that the uploaded file is listed on your Azure DevOps Project

    8. Create a Release Pipeline. On your Azure DevOps Project, click on the Release Pipeline page.

      Click the Release Pipeline

    9. We create a new Release pipeline, but an existing pipeline can be reused. Click the New pipeline button to create a new release pipeline.

      Click the New pipeline

    10. On the right sidebar, click Empty job to create an empty Release Stage.

    11. To add an Artifact, click on the Add an artifact button.

      Click Empty job Click Add an artifact

    12. To add an Artifact, click +Add an artifact.

      Click Add an artifact

    13. Select Azure Repository and enter the required information, and then click Add.

    14. In the Artifact dialog, do the following:

      1. Select Build from the Source type dropdown menu.

      2. For Project and Source, select the necessary project.

      3. Choose Default version to Latest.

      4. Then click Add.

        Artifact dialog

    15. The pipeline now includes the newly created artifact.

    16. To add a task to the stage, click on 1 job, 0 task.

      Stage 1 (1 job, 0 task)

    17. You can add a Kobiton task to execute a test on a Kobiton device. Click on +Add a task to agent job to add a task to the stage.

      Add a task to agent job

    18. Click on the Kobiton icon to add a Kobiton task.

      Agent job

    19. Enter the required information to set up the task.

      Enter the required information to set up the task

    20. You have successfully created the task. You can also create a task to upload a new version of the app from APK file.

The next two sections will guide you on how to use these Kobiton Release Tasks.