Is it possible to export an AIMMS model to .aimmspack file from Azure Devops Pipeline?
Goal is to generate the .aimmspack file from the Azure Devops Pipeline after the model source files have changed.
I was hoping to run aimms.exe --export-to without have a user signed in, or storing the private license files in a public place.
From Documentation:
Through the --export-to option you can instruct Aimms to create an encrypted end-user project either packed to the .aimmspack file specified, or unpacked into a specified folder. When using this commandline option, Aimms will use the export settings as saved by the previous call to the File-Export End-User Project menu. You can use this commandline option, for instance, within the context of a continuous integration server, to automate the deployment of your Aimms application after new commits have been pushed to the version control repository managing the project. Specifying the unpack folder When running an .aimmspack file, Aimms will ask for the folder where you want the .aimmspack file to be unpacked. Alteratively, you can already specify the unpack folder through the --unpack-folder commandline option
Anyone have any ideas on how to generate aimmspack in CI / CD pipelines?
What do you mean by local machine?
We don't want to check in the .aimmspack.
By local machine, I mean the machine on which a developer makes changes to the source code. Change source code, commit on local machine - trigger a commit-hook to create the .aimmspack file. The developer then pushes his changes (which includes the new .aimmspack file) to the remote server, which will trigger your CI/CD pipelines.
We are using Azure DevOps, I don’t see commit-hook feature in Azure DevOps.
Hi
Creation of the .aimmspack file requires the aimms executable and also a license, so it is not possible to have this process part of pipelines which run on remote servers as of now.
Hooks are a git feature and Azure Repos work with Git or TFVC. Which one are you using ? I would expect TFVC to have an equivalent feature as well. Git - githooks Documentation (git-scm.com)
The workflow is as below
- AIMMS Developer (with a license) makes changes in the project source code on their computer.
- Commit their changes with a commit message.
- The git hook script is executed and creates the .aimmspack file.
- Push their changes to the remote server.
- CI/CD pipeline starts.
See below example where I configured exportAIMMS.bat as a hook to be run every time I start a commit. As soon as I start the commit process, the exportAIMMS.bat file is executed and it will create the aimmspack of the Model.aimms project.
We use TortoiseGIT as a UI for git and here’s the configuration.
All of this will happen client side, on the computer of the person who is making changes to the AIMMS source code. Pipelines will start once they push their changes to the remote server.
The project and bat file is attached for your reference.
I also support this feature request for a CI/CD setup and a potential trunk-based development:
- Developer pushes a commit
- Pull Request kicks in a CI step to verify unit tests and successful (aimmspack) build before code review
- PR for release deploys aimmspack to dev server and stages production deployment until approval
- Changes merged into trunk after code review
Besides having a build server with a valid AIMMS license, there needs to be a service that allows for POST request of aimmspack and application configuration on AIMMS PRO servers.
The unit tests may be carried out locally (via git-hooks) before the PR is opened and can be verified as a part of build policy by checking for AimmsUnit.SUCCEEDED file after making changes. The latter would allow having a light-weight license without any solvers for the build server.
We could also complete all testing and building locally via git-hooks as you suggest but a feature to manage AIMMS PRO applications from the build server will enable the CD step and further UI testing on dev/test server.
No need for voting, we have a REST API for managing PRO on our roadmap already (including publishing and running apps). We also have creating an aimmspack from the command line on our roadmap.
Old topic, but here is a follow up on this topic:
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.