Ignition 8.3 CI/CD Tutorial

Hi all,

I don't want to plug in my work too much, but I feel it's really relevant in this community.
if anyone has interest in this topic, I've made a video on how to do CI/CD in Ignition 8.3: https://www.youtube.com/watch?v=svj5-1t8aAk

Since the release of Ignition 8.3, we’ve received many questions about how to approach CI/CD effectively. In this video, I walk through practical strategies and lessons learned to help you implement it with confidence.

Don't forget to check out the open source repo we used for that demo-project:

5 Likes

This would be one of my question after viewing your video yesterday :slight_smile: Glad you did it

1 Like

Hi Jasper

I wanted to point out that config/gateway/local and config/gateway/resources/local is still being versioned. In your .gitignore, you have inductive's entries but they mount the configuration different than you do. See this guide. The .gitignore entries would actually be:

**/config/gateway/local
**/config/gateway/resources/local

Instead of:

**/config/local
**/config/resources/local

Can you also explain why you have your domain as a separate package outside of the ignition project?

Thanks for sharing!

Thanks for pointing out, yes, that is wrong!

I have one customer that does this, because they want those extra vs-code features that normal python provides. I would personally not do it that way, and just wanted a way to have every use case concerning ci/cd covered in the example. Good question!

This is a strange justification to put your domain logic solely in a separate package. You now have two python versions that you have to validate against. You are running python3 -m pytest and importing the code into Jython 2.7. Also I see that in projects/TestProject/ignition/script-python/test/all/code.py you are manually importing the tests. I would strongly recommend using the unittest standard library and using its loader. I have a script that auto discovers test cases (runs faster gateway scoped) :slight_smile:

extra vs-code features

To get VS Code support for ignition scripts, I just generate python stubs and use pyright. Not to create plugception, but I made Ignition Sift, a VS Code extension that sits on top of pyright. It essentially solves the "Ignition not having a valid python package structure" issue that causes the LSP and type checker to not pick up ignition scripts. Also provides support for quick relative imports :smiley:

Hope this is clear! Thanks for your response Jasper!

You are thorough! I have to say, I did not put that much attention to the tests part of the demo, but I am interested in your work! It looks better then what we are doing in our projects.

That script is legend, Ignition Sift also looks like an awesome idea! Can't wait to play around with those. One video I would like to make is doing unit-tests in Ignition, I might feature you and your script!

Thanks for taking the time to watch this demo so up close :slight_smile: .

1 Like