Build ECF in Azure DevOps pipeline Magic 3.3


meis.wietze.lammers@...
 

Hello,

I am trying to create the ecf via a build pipeline in Azure DevOps using Magic 3.3.
When I create the ecf using MgxpaSettings.exe on my notebook in a CMD the Project.ecf is created and there are no errors on screen or in a log.

But when I do the same in Azure DevOps in a build pipeline the process doesn't create the ecf and doesn't stop.
From the log in Azure DevOps I see the correct commandline is created.
##[debug]INPUT_SCRIPT: '\\SERVER-FS01\tfs\MagicStudio33\MgxpaSettings.exe /CreateECF edp_path=d:\_work\A2\51\s\Project\Project\Project.edp ,ecf_path=d:\_work\A2\51\a\ECF\Project.ecf
But after an hour the process hits the timeout and the pipeline is stopped.

On the build machine the MgxpaSettings.exe is still loaded.
It has the file d:\_work\A2\51\s\Project\Project\Project.lock open.
The service process needs to be killed before the the pipeline can be run again or it will stop because the Project.lock file is in use.

What am I doing wrong?
Should I be using Powershell as opposed to CMD?

Regards,

Meis Wietze Lammers


meis.wietze.lammers@...
 

Hi,

For Powershell the inline script is:
d:\_work\A2\64\b\MagicStudio33\MgxpaSettings.exe /CreateECF "edp_path=d:\_work\A2\64\s\Project\Project\Project.edp" ",ecf_path=d:\_work\A2\64\a\Project.ecf"

Notice that I leftout the \ECF folder in the ecf_path parameter.
MgxpaSettings.exe /CreateECF will not create a folder. That was problem #1.

Problem #2 was that you need to have all Magic component ecfs available.
It was sufficient to copy them next to the Project.edp file.

But problem #3 is still a mystery.
The Powershell script only makes an ECF when under the Advanced options the Fail on Standard Error and Show warnings as Azure DevOps warnings are checked.
For testing I use a local vsts-agent. So I could use ProcessMonitor to see what happened while the MgxpaSettings.exe was running.
I found that the source is copied to %TEMP% xml file by xml file. Probably they are also encrypted and zipped. 
In between the virus scanner checks these new files!
I think that the virus scanner causes a problem, but I could not find a clear indication for it in the ProcessMonitor log.

Does anybody know of problems with automatic building of an ECF and virus scanners?

Regards,

Meis Wietze Lammers


Anton Doank
 

hi meis, i dont have any experience in azure devops pipeline so i cant help you in this case but i have interest in this technology, i search in google what is this azure devops pipeline use for and google said its for CI CD. if you have success implement this i hope you could share the knowledge


meis.wietze.lammers@...
 

Hello Anton Doank,

Regarding information on Azure DevOps in general you are better of reading the info on the microsoft.com site.

For Magic 3.3 you can use Team Foundation Server (TFS) for source safe.
TFS is available in Azure DevOps.
So you develop in Magic and check-out and check-in de Magic source code in TFS.

For CI CD you create pipelines that use your source code (and whatever else is needed) to build your applications and deploy them or in our case create a setup.
The steps my pipeline for building an ECF does are:
1. Get the Magic source code from TFS to the build machine.
2. Copy a zip file to the build machine. This zip file contains a map structure with everything the Magic source code is dependent on and the Magic Studio/Magic Settings environment. I tested this map structure on my notebook and improved things until there were no errors and warnings reported while making an ecf with the MgxpaSettings.exe.
3. Unzip the zip file.
4. Build the ecf in a PowerShell script as described in my previous post.
5. Publish the ecf in a map so other pipelines can pick it up there.

Regards,

Meis Wietze Lammers


Jeroen Bos
 

Hi Meis,

 

We have developed a script with autoit that:

 

  • Retrieves the last version of the application from TFS and put this in a new workspace especially for creating the ecf.
  • Checks if progs/tables/etc are checked out.
  • If not, send an email to the organization that a new version of the application is being build.
  • Get the last version number of out of our ini file (the version number is the name of the ecf file).
  • Build the new ecf
  • Place the new ecf in the correct directory on the network
  • Update the ini with the new version number.
  • Halt till our brokers have manually been restarted
  • When this manually action has been performed, we need to click on a button to proceed.
  • An email is sent to the organization that the new version has been deployed.
  • The temporary workspace in TFS is deleted
  • All files that were downloaded from TFS for building the ecf are deleted from disk.

 

The autoit script has been deployed as an executable and can be executed by every developer in our company that has the TFS client installed on his workstation and has access to the TFS server (which is on Azure DevOps).

 

Met vriendelijke groet / Yours sincerely

De bronafbeelding bekijken
 

 


Jeroen Bos | Technisch Consultant (Technical Consultant)

Lekkerland Nederland B.V. | Ekkersrijt 7601 | 5692 HR Son

+31 (0) 40 264 4400 

jeroen.bos@...

www.lekkerland.nl | www.lekkerland24.nl

De bronafbeelding bekijken
 


Volg ons op              

 

 

Van: main@magicu-l.groups.io <main@magicu-l.groups.io> Namens meis.wietze.lammers via groups.io
Verzonden: woensdag 11 mei 2022 09:02
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Build ECF in Azure DevOps pipeline Magic 3.3

 

Hello Anton Doank,

Regarding information on Azure DevOps in general you are better of reading the info on the microsoft.com site.

For Magic 3.3 you can use Team Foundation Server (TFS) for source safe.
TFS is available in Azure DevOps.
So you develop in Magic and check-out and check-in de Magic source code in TFS.

For CI CD you create pipelines that use your source code (and whatever else is needed) to build your applications and deploy them or in our case create a setup.
The steps my pipeline for building an ECF does are:
1. Get the Magic source code from TFS to the build machine.
2. Copy a zip file to the build machine. This zip file contains a map structure with everything the Magic source code is dependent on and the Magic Studio/Magic Settings environment. I tested this map structure on my notebook and improved things until there were no errors and warnings reported while making an ecf with the MgxpaSettings.exe.
3. Unzip the zip file.
4. Build the ecf in a PowerShell script as described in my previous post.
5. Publish the ecf in a map so other pipelines can pick it up there.

Regards,

Meis Wietze Lammers

-------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the
intended receipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.

Deze e-mail kan vertrouwelijke en/of persoonlijke informatie bevatten. Als u niet de bedoelde
ontvanger bent, of deze e-mail per ongeluk heeft gekregen, breng dan de verzender
ogenblikkelijk hiervan op de hoogte en vernietig dit bericht.
Het kopieren, in de openbaarheid brengen of verspreiden van de inhoud van deze e-mail is ten
strengste verboden.

Ce courriel peut contenir des informations confidentielles et/ou privilegiees. Si ce courriel ne vous est pas destine
(ou vous avez recu ce courriel par erreur) svp, avertissez immediatement la personne qui a envoye ce courriel et detruisez le.
Toute copie non autorisee, divulgation des informations ou distribution du contenu de ce courriel sont strictement interdites.
-------------------------------------------------------------------------------------------------