Book a Demo

Author Topic: Connection to EA model file via jenkins Job  (Read 3280 times)

umairjadoon

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Connection to EA model file via jenkins Job
« on: July 06, 2023, 06:46:10 pm »
Hello all,

I am pretty new to EA automation and having trouble running a jenkins job which executes a python script that connects to ea model file. Script runs fine when executed locally on the jenkins node but throw the following error when executed via jenkins.
Code: [Select]
Traceback (most recent call last):
  File "myscript.py", line 28, in <module>
    ea_repository.OpenFile2("path_to_ea_file.qea", args.ea_user, "")
  File "<COMObject <unknown>>", line 2, in OpenFile2
pywintypes.com_error: (-2147023170, 'The remote procedure call failed.', None, None)

Folllowing is relevant part of the script:
Code: [Select]
import win32com.client
try:
  eaApp =win32com.client.Dispatch("EA.App")
except:
  sys.stderr.write( "Unable to connect to EA\n" )
  exit()
ea_repository = eaApp.Repository
ea_repository.OpenFile2("path_to_ea_file.qea", args.ea_user, "")

I assume its more of a Jenkins issue then EA but i couldnt find any thing that helped me so far. Thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connection to EA model file via jenkins Job
« Reply #1 on: July 06, 2023, 07:30:10 pm »
EA is a client application that will only run in a user context, of a user that has a license for EA.

Geert

umairjadoon

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Connection to EA model file via jenkins Job
« Reply #2 on: July 06, 2023, 08:10:01 pm »
Hi Geert,

Thanks for the reply. We are using the floating license from a shared key store. EA runs fine when i login with the same user that runs the Jenkins job. so this rules out the context issue or i am misunderstanding something here?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connection to EA model file via jenkins Job
« Reply #3 on: July 06, 2023, 08:15:41 pm »
Hi Geert,

Thanks for the reply. We are using the floating license from a shared key store. EA runs fine when i login with the same user that runs the Jenkins job. so this rules out the context issue or i am misunderstanding something here?
Looks like it, unfortunately I don't have any experience with Jenkins, so I can't confirm.
I've seen some posts about Jenkins on the this forum, so it might be worth to do a search.

Geert