Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please use below steps to to create job task which can do file upload in Perfecto Private/Enterprise & Public Tenant repository from Azure DevOps Build/specific folder.

1. Step-by-step guide for Perfecto Private/Enterprise Clouds (Using Legacy API)

  1. Add Agent Job to add cURL Upload Files plugin
  2. Choose the Upload task
  3. Choose specific file path OR Build Path wherever deployed is done by project pipeline in Azure DevOps. for e.g. here we are choosing a path for APK "$(System.DefaultWorkingDirectory)/_Demo/resources/ExpenseAppVer1.4.apk"
  4. Choose service Connect or UserName and Password according to need to choose and provide proper information.
  5. Here we are choosing Service connection by creating Perfecto Service Connection by using Manage Link, here already created the service connection for Perfecto
    5.1. user can use project settings to create a service connection by using Perfecto Private/Enterprises cloud and credentials.
  6. After creating choose Perfecto service connection name
  7. Now provide cURL command for uploading the file as mention here by using API for Upload File(Legacy) which will work for Perfecto Private clouds : "services/repositories/media/PRIVATE:script/ExpenseAppVer1.4.apk?operation=upload&securityToken=eyJhb..._aNRoew" , here the user is trying to upload APK in "PRIVATE:script" perfecto repository path, the same path can be configured in automation framework to pick apk/ipa file.
  8. Need to use "-X POST" arguments which can be passed to above mentioned command. and enable the checkbox for Control Options to pick task in execution time.

Screenshot: Step-by-Steps implementation as below.


Step-by-step guide for Perfecto Private / Public

...

-Tenant clouds (Using New API)

 

  1. Add Agent Job to add "Command Line" plugin
  2. Choose 2nd version of command line plugin/task version.
  3. cURL command to be prepared as per API of Perfecto File Upload (New API) as mentioned below and provided e.g for cURL command with required parameters.
    1. Sample command for reference : 

      curl "https://<YourCloudName>-public.app.perfectomobile.com/repository/api/v1/artifacts" -H "Perfecto-Authorization: <YourSecurityTokenToBeMentionedHere>" -H "Content-Type: multipart/form-data" -F "requestPart={\"artifactLocator\":\"PRIVATE:script/ExpenseAppAzureVer1.0.apk\",\"artifactType\":\"ANDROID\",\"override\":true}" -F "inputStream="$(System.DefaultWorkingDirectory)”/Perfecto_DevOps_CD_CT_ProcessDemo-Android-CI/drop/app/build/outputs/apk/debug/app-debug.apk”

    2. <YourCloudName> : mention your cloud name
    3. inputStream : please use proper path of File (APK/IPA/ZIP/APKS/etc) which is from Azure DevOps has been generated as input to inputStream parameter as mentioned above point. here $(System.DefaultWorkingDirectory) is pointing to Azure DevOps working directory.
    4. artifactLocator : mention proper path to your perfecto repository may be to PRIVATE/PUBLIC location.
  4. Agent has been executed which is being uploaded file to Public Tenant cloud repository location.

...