How to DevOps Build Pipeline with arcpy python module?

414
4
01-25-2022 08:44 AM
MaximilianGlas
Esri Contributor

Hey guys,

We are actually developing Web Tools based on ArcGIS Pro 2.8 to publish in ArcGIS Enterprise 10.8.1.

We want to establish unit tests and want to run these tests in Azure DevOps Pipelines.

While in a local environment I have an ArcGIS Pro installed, of course this is not the case in an Azure DevOps environment. And simply trying to install arcpy module with python install failed.

What is the recommended scenario from Esri to establish this?

Kind regards,

Max

Tags (3)
4 Replies
JeffK
by MVP Regular Contributor
MVP Regular Contributor

Does the arcgis for python API work for what you are trying to do?

0 Kudos
MaximilianGlas
Esri Contributor

Well, we already use the arcgis for python API additionally, but it does not cover all our use cases. That's why we also need the arcpy module.

0 Kudos
ArnaudRodier
New Contributor II

Hi @MaximilianGlas ,

We would like to use arcpy library to run some python script and register views via Azure DevOps Pipelines. Did you get any answer from ESRI or did you manage to make it working?

Thanks

Arnaud

0 Kudos
MaximilianGlas
Esri Contributor

I got no answer so far and I don't have a real solution.

Possible ideas:

  • Install an ArcGIS product which delivers arcpy (Pro or Server) on an machine which is used in the build process. But: no idea if this will work. And you are dependent on this installation, which could change with an auto update. Not really preferred.
  • Try to isolate arcpy (and its dependencies) and include it in the version control system. No idea if this is possible with an acceptable effort. At least it will be a lot of data (my arcpy has 1,15 GB) in vcs. Even not sure if this is feasible because of the underlying ArcObjects core.
  • Try to mock the arcpy calls. In my tests this works fine, but of course you will not be able to test all components with real conditions.

What are your thoughts and attempts so far?

0 Kudos