I just want to inform you about our plans and the current status of automating the build process for CODESYS libraries. So it might be helpful for some people who are in the same situation.
Background story:
I am a software engineer at powerIO GmbH, normally I use high level languages for the products we develop and offer. Sometimes I work with my team on CODESYS libraries, which can also be found in the CODESYS store. Most of the time I spend with them on architecture tasks and tasks that are not directly related to our products.
Every time I see the manual processes for releasing a library etc., I am very surprised about this time intensive process.
Current situation:
I know there has been a scripting interface for years. CODESYS Git was released a few years ago, but the scripting interface was only released a few months (weeks?) ago. We developed a pseudo-automated solution a few months ago, but it was all very hacky.
So now there is a better Git implementation and also more modularization and installation options. For example, the CODESYS installer has a full CLI, which makes it very convenient to install CODESYS installations headless.
Plans:
I think it's the right time to develop a better automation solution.
Most of our software projects are hosted on Github and we use Github actions very intensively for other software projects. Therefore, we have decided to use Github for our CODESYS library projects as well.
Following tasks should be implemented in automation for CI/CD tasks:
- Automated setup of CODESYS installation (Already released: https://github.com/marketplace/actions/setup-codesys-installation)
- Checkout CODESYS libraries
- Execute tests scripts
- Sign CODESYS libraries
- Extract Library documentation
- Create CODESYS package
- Sign CODESYS package
Side Note:
- This is mainly a side project, and we do not provide support for the CI/CD part.
- This topic is here to help and also to get help from other software engineers.
- This project and idea is not prioritized as I am currently the only one working on it and I hope it will help us and also others and increase productivity.
- We are putting this out there as an organization, but priorities can change quickly and the CI/CD tasks I am developing are mostly done in my spare time. So please don't expect this to happen in a short time or even be fully completed.
I would be very happy if some ppl will join the development process and might be open to discuss some technical details for this.
I hope this topic is not to off-topic, but I think the CI/CD part is very important today and it can increase a lot of quality and push productivity.
Thanks :)
π
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been looking for a solution to the CI/CD issue for a long time.
Briefly about me... I am 32 and software architect for Codesys V3 and fullstack dev for web (VueJS, NestJS) in a small company in Erfurt (Germany). https://www.rex-at.de/. Through my web part, we already have CI/CD running well via GitLab (YAML-based configuration file (.gitlab-ci.yml), which defines which pipelines and jobs are executed when certain events occur) with everything you know.
Stages for npm packages
- prepare (GitVersion, npm install or whatever)
- build (vite, tsc or whatever)
- testing (vitest, jest or whatever)
- deploy (npm packages)
And similar for monorepo's or backend services (in NestJS) as DockerImages.
For Codesys we have been building an OOP framework for years (~50 libraries now), which is currently managed via SVN and a specially written Svn-Watcher (in Python) gets commits and runs and builds everything together and deploys it to an FTP server and network drive.
Why do we still have SVN? Because we are unfortunately still tied to the safety integration of Codesys and can therefore only go to SP15 at most with our controller/Eckelmann.
But soon there will be an update and there will be no more obstacles to using Git.
Hence my questions:
1. the basic idea is to run a local Windows Runner on some machine?
2. install Codesys on the machine where the runner is running?
3. powershell & python scripts are then used to execute builds (compile, build, sign libraries) & deploys?
4. can the Github action also be used in GitLab? ChatGPT has already told me that it's not the same, but it doesn't hurt to ask. Do you have any ideas on this?
Greetings :D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your inquiry, and I apologize for the delayed response!
We use GitHub Actions cloud runners for this purpose, as it eliminates the need to maintain our own build runners. You can get started by creating a free GitHub account, which includes complimentary minutes for running actions on Windows runners.
Hello community,
I just want to inform you about our plans and the current status of automating the build process for CODESYS libraries. So it might be helpful for some people who are in the same situation.
Background story:
I am a software engineer at powerIO GmbH, normally I use high level languages for the products we develop and offer. Sometimes I work with my team on CODESYS libraries, which can also be found in the CODESYS store. Most of the time I spend with them on architecture tasks and tasks that are not directly related to our products.
Every time I see the manual processes for releasing a library etc., I am very surprised about this time intensive process.
Current situation:
I know there has been a scripting interface for years. CODESYS Git was released a few years ago, but the scripting interface was only released a few months (weeks?) ago. We developed a pseudo-automated solution a few months ago, but it was all very hacky.
So now there is a better Git implementation and also more modularization and installation options. For example, the CODESYS installer has a full CLI, which makes it very convenient to install CODESYS installations headless.
Plans:
I think it's the right time to develop a better automation solution.
Most of our software projects are hosted on Github and we use Github actions very intensively for other software projects. Therefore, we have decided to use Github for our CODESYS library projects as well.
Following tasks should be implemented in automation for CI/CD tasks:
- Automated setup of CODESYS installation (Already released: https://github.com/marketplace/actions/setup-codesys-installation)
- Checkout CODESYS libraries
- Execute tests scripts
- Sign CODESYS libraries
- Extract Library documentation
- Create CODESYS package
- Sign CODESYS package
Side Note:
- This is mainly a side project, and we do not provide support for the CI/CD part.
- This topic is here to help and also to get help from other software engineers.
- This project and idea is not prioritized as I am currently the only one working on it and I hope it will help us and also others and increase productivity.
- We are putting this out there as an organization, but priorities can change quickly and the CI/CD tasks I am developing are mostly done in my spare time. So please don't expect this to happen in a short time or even be fully completed.
I would be very happy if some ppl will join the development process and might be open to discuss some technical details for this.
I hope this topic is not to off-topic, but I think the CI/CD part is very important today and it can increase a lot of quality and push productivity.
Thanks :)
more posts ...
@eschwellinger can this be moved to the engineering section (forum) ?
hello kevinrn,
I've been looking for a solution to the CI/CD issue for a long time.
Briefly about me... I am 32 and software architect for Codesys V3 and fullstack dev for web (VueJS, NestJS) in a small company in Erfurt (Germany). https://www.rex-at.de/. Through my web part, we already have CI/CD running well via GitLab (YAML-based configuration file (.gitlab-ci.yml), which defines which pipelines and jobs are executed when certain events occur) with everything you know.
Stages for npm packages
- prepare (GitVersion, npm install or whatever)
- build (vite, tsc or whatever)
- testing (vitest, jest or whatever)
- deploy (npm packages)
And similar for monorepo's or backend services (in NestJS) as DockerImages.
For Codesys we have been building an OOP framework for years (~50 libraries now), which is currently managed via SVN and a specially written Svn-Watcher (in Python) gets commits and runs and builds everything together and deploys it to an FTP server and network drive.
Why do we still have SVN? Because we are unfortunately still tied to the safety integration of Codesys and can therefore only go to SP15 at most with our controller/Eckelmann.
But soon there will be an update and there will be no more obstacles to using Git.
Hence my questions:
1. the basic idea is to run a local Windows Runner on some machine?
2. install Codesys on the machine where the runner is running?
3. powershell & python scripts are then used to execute builds (compile, build, sign libraries) & deploys?
4. can the Github action also be used in GitLab? ChatGPT has already told me that it's not the same, but it doesn't hurt to ask. Do you have any ideas on this?
Greetings :D
Hi @steven-schalm,
Thank you for your inquiry, and I apologize for the delayed response!
We use GitHub Actions cloud runners for this purpose, as it eliminates the need to maintain our own build runners. You can get started by creating a free GitHub account, which includes complimentary minutes for running actions on Windows runners.
You can find an example implementation in our repository: https://github.com/powerIO-GmbH/action-codesys-setup
I'm currently working on making additional features public, including:
Git checkout functionality, Code signing, Custom script execution
However, these additions require some preparation before release. Feel free to contribute to the project!
BTW: You can also execute this locally, even the yml files with nektos/act on your windows dev machine.