You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run Static code analysis on VIs using VI Analyzer Toolkit
2
+
Please find the old examples for Linux Containers with LabVIEW 2025 Q3 [here](./examples2025q3.md)
5
3
6
-
**Use Command:**
7
-
```
8
-
LabVIEWCLI
9
-
-OperationName RunVIAnalyzer \
10
-
-ConfigPath <Path to VI Analyzer config file> \
11
-
-ReportPath <Location for saving the report> \
12
-
-LabVIEWPath <Path to LabVIEW Executable>
13
-
```
14
-

15
-
16
-
### LabVIEWCLI: CreateComparisonReport
17
-
Create a diff report between two VIs
4
+
The following examples are for **LabVIEW 2026 Q1** supporting **both Linux and Windows containers** along with the introduction of **Headless Run Mode**
LabVIEWCLI -OperationName RunVI -VIPath <Path to VI> -LabVIEWPath <Path to LabVIEW Executable>
19
+
docker images
49
20
```
21
+

50
22
51
-
For full details on all available LabVIEWCLI Commands, please find the official NI's LabVIEWCLI Documentation [here.](https://www.ni.com/docs/en-US/bundle/labview/page/predefined-command-line-operations.html?srsltid=AfmBOorqX__K-Rfh8JZCEho3PyoM75cXxBwij71DN5g89FPu6YoTZ7VQ)
52
-
53
-
## Example Usage: Change entrypoint of the container
54
-
By default, the LabVIEW container image does not define a default **CMD** or **ENTRYPOINT.**
55
-
56
-
The entrypoint of a container is the primary process that runs when the container starts — often referred to as PID 1.
57
-
58
-
Fortunately, Docker allows you to override the entrypoint at runtime using the `--entrypoint` flag.
59
-
60
-
You can launch the container with LabVIEWCLI as the main process like this:
61
-
62
-
```shell
63
-
docker run --rm --entrypoint LabVIEWCLI labview:2025q3-linux
23
+
### 3. Running a container
24
+
After pulling, enter:
25
+
```bash
26
+
docker run -it nationalinstruments/labview:2026q1-windows
64
27
```
28
+
The above command will initialize a container for the LabVIEW image and drops the user into the interactive shell of container.
65
29
66
-

67
-
68
-
This will start the container, run LabVIEWCLI, and then terminate the container once the CLI process exits.
69
-
70
-
### Why Use This?
71
-
- Perform a single CLI-driven task (e.g., mass compile, run a VI)
72
-
- Exit cleanly after completing that task
73
-
- Be used in CI/CD pipelines or automation scripts
74
-
75
-
## Example Usage: Mount Local Volumes
76
-
You can mount a local directory into the container using the `-v` (volume) flag.
77
-
78
-
Let's mount a local directory into the container and see the contents of a text file.
79
-
80
-
**Use Command:**
81
-
```shell
82
-
docker run -it -v C:\ni:/mounted_directory labview:2025q3-linux
-`-v C:\ni:/mounted_directory` tells Docker to mount your local folder into `/mounted_directory `inside the container.
88
-
- The container will have read/write access to the mounted folder.
89
-
90
-
## Example Usage: Integration with CI/CD
91
-
The combination of the above usages along with automation tools like GitHub actions, Jenkins etc can unlock the true potential of LabVIEW in CI/CD Environments.
92
-
93
-
Let's look at an example of integrating LabVIEW Container into a GitHub action. All the neccessary files are present at **{repo-root}/examples/integration-into-cicd**
94
-
95
-
### Testing Script
96
-
A script designed to run LabVIEWCLI to perform `MassCompile` and `RunVIAnalyzer` operations on a set of Test-VIs.
97
-
98
-
The script is located here: [runlabview.sh](../examples/integration-into-cicd/runlabview.sh)
99
-
100
-
The job of the script is to:
101
-
1. Run LabVIEWCLI MassCompile Operation
102
-
2. Run LabVIEWCLI VI Analyzer Operation
103
-
3. Exit with error is any of the above operation fail.
104
-
105
-
### GitHub Action
106
-
The configuration file for example GitHub Action is located here at: [labview-container-check.yml](../.github/workflows/labview-container-check.yml)
107
-
108
-
The action does the following:
109
-
1. Login into GitHub Container Registry
110
-
2. Pull in the image `labview:2025q3-linux`
111
-
3. Mount the repository into the container
112
-
4. Run the script `runlabview.sh` as container's entrypoint.
113
-
114
-
The action is set to be triggered when any pull request is created, updated or reopened.
115
-
116
-
### Running the GitHub Action
117
-
A testing Pull Request has been created that demonstrates the use of the script `runlabview.sh` and the GitHub Action to run LabVIEWCLI inside a container.
118
-
119
-
Link to the Pull Request: [Integration into CI/CD](https://github.com/ni/labview-for-containers/pull/8)
120
-
121
-
- When a Pull Request is opened, a status check running the GitHub Action can be seen.
122
-

123
-
124
-
- If we navigate to the run logs by clicking on the Action, we can see what all jobs were executed as part of this pipeline.
125
-

36
+
### 5. Accessing LabVIEWCLI's Operation specific help
The Complete run can be found [here.](https://github.com/ni/labview-for-containers/actions/runs/16333422879/job/46140796978?pr=5)
48
+
For other supported operations, see example scripts here:
49
+
1.[Example Script for Windows](../examples/integration-into-cicd/runlabview.ps1)
50
+
2.[Example Script for Linux](../examples/integration-into-cicd/runlabview.sh)
131
51
132
-
___
52
+
### 7. Closing LabVIEW Gracefully
53
+
The recommended way to close a Headless LabVIEW instance is through LabVIEWCLI `CloseLabVIEW` operation.
54
+
```powershell
55
+
LabVIEWCLI -OperationName CloseLabVIEW -Headless
56
+
```
57
+

58
+
59
+
### 8. Debugging LabVIEW Issues
60
+
There is no UI when LabVIEW in running in Headless mode. To debug a issue in LabVIEW, use the following techniques:
61
+
1.**Inspect LabVIEWCLI Log**
62
+
- Whenever a LabVIEWCLI Operation is ran, LabVIEW logs the operation output into a log file.
63
+
- The path to the logfile is displayed on the STDOUT.
64
+
-
65
+
- In the above example, the log file is generated at: `%temp%\lvtemporary_321777.log`
66
+
- Inspect the log file to understand the issue.
67
+
2.**Inspect LabVIEW's own log file**
68
+
- LabVIEW logs important details in a separate log file located at: `%temp%\<AppName>_<Bitness>_<version>_<headless/interactive>_<user>_<log/cur>.txt`
69
+
- Depending on the current running application, `<AppName>` could be LabVIEWCLI, LabVIEW or other LabVIEW Build Applications
70
+
- Depending on the run mode of the application, the information would be logged into either a `headless` or `interactive` logfile.
71
+
- The current instance always logs in a log file containing the string `cur` whereas the older logfile (if any present) is renamed from `cur` to `log`
72
+
- Inspect the application specific logfile to get information on what went wrong.
73
+
-
74
+
3.**Inspect Unwired Errors**
75
+
- If your VIs contain unwired errors, they are automatically logged into a log file when running in Headless Mode.
76
+
- The path to the log file generally is: `%Documents%\LabVIEW Data\UnwiredErrors\LabVIEW*.UnwiredErrors.log`
77
+
4.**DWarns are automatically logged when running in Headless Mode**
78
+
79
+
### 9. Integration into GitHub Actions
80
+
A example GitHub action is configured to run LabVIEWCLI on LabVIEW Containers.
81
+
The YAML Configurations are located here: [GitHub Actions for LabVIEW Containers](https://github.com/ni/labview-for-containers/tree/main/.github/workflows)
82
+
83
+
To see all of this in action, do the following:
84
+
1. Fork this repository: [labview-for-containers](https://github.com/ni/labview-for-containers/tree/main)
85
+
2. Raise a Pull request with a small change to any of the repo files.
Feel free to tailor the workflow to your needs—add or remove jobs, adjust environment variables, or modify volume mounts. You can also use the provided YAML definitions as a springboard for your own CI/CD pipelines. This example is meant as a reference implementation to help you quickly integrate LabVIEWCLI commands into your automated workflows.
135
93
@@ -138,4 +96,3 @@ Feel free to tailor the workflow to your needs—add or remove jobs, adjust envi
LabVIEWCLI -OperationName MassCompile -DirectoryToCompile <Directory to Compile> -LabVIEWPath <Path to LabVIEW Executable>
39
+
```
40
+
41
+

42
+
43
+
### LabVIEWCLI: RunVI
44
+
Run a specific VI on the system.
45
+
46
+
**Use Command:**
47
+
```bash
48
+
LabVIEWCLI -OperationName RunVI -VIPath <Path to VI> -LabVIEWPath <Path to LabVIEW Executable>
49
+
```
50
+
51
+
For full details on all available LabVIEWCLI Commands, please find the official NI's LabVIEWCLI Documentation [here.](https://www.ni.com/docs/en-US/bundle/labview/page/predefined-command-line-operations.html?srsltid=AfmBOorqX__K-Rfh8JZCEho3PyoM75cXxBwij71DN5g89FPu6YoTZ7VQ)
52
+
53
+
## Example Usage: Change entrypoint of the container
54
+
By default, the LabVIEW container image does not define a default **CMD** or **ENTRYPOINT.**
55
+
56
+
The entrypoint of a container is the primary process that runs when the container starts — often referred to as PID 1.
57
+
58
+
Fortunately, Docker allows you to override the entrypoint at runtime using the `--entrypoint` flag.
59
+
60
+
You can launch the container with LabVIEWCLI as the main process like this:
61
+
62
+
```shell
63
+
docker run --rm --entrypoint LabVIEWCLI labview:2025q3-linux
64
+
```
65
+
66
+

67
+
68
+
This will start the container, run LabVIEWCLI, and then terminate the container once the CLI process exits.
69
+
70
+
### Why Use This?
71
+
- Perform a single CLI-driven task (e.g., mass compile, run a VI)
72
+
- Exit cleanly after completing that task
73
+
- Be used in CI/CD pipelines or automation scripts
74
+
75
+
## Example Usage: Mount Local Volumes
76
+
You can mount a local directory into the container using the `-v` (volume) flag.
77
+
78
+
Let's mount a local directory into the container and see the contents of a text file.
79
+
80
+
**Use Command:**
81
+
```shell
82
+
docker run -it -v C:\ni:/mounted_directory labview:2025q3-linux
83
+
```
84
+
85
+

86
+
87
+
-`-v C:\ni:/mounted_directory` tells Docker to mount your local folder into `/mounted_directory `inside the container.
88
+
- The container will have read/write access to the mounted folder.
89
+
90
+
## Example Usage: Integration with CI/CD
91
+
The combination of the above usages along with automation tools like GitHub actions, Jenkins etc can unlock the true potential of LabVIEW in CI/CD Environments.
92
+
93
+
Let's look at an example of integrating LabVIEW Container into a GitHub action. All the neccessary files are present at **{repo-root}/examples/integration-into-cicd**
94
+
95
+
### Testing Script
96
+
A script designed to run LabVIEWCLI to perform `MassCompile` and `RunVIAnalyzer` operations on a set of Test-VIs.
97
+
98
+
The script is located here: [runlabview.sh](../examples/integration-into-cicd/runlabview.sh)
99
+
100
+
The job of the script is to:
101
+
1. Run LabVIEWCLI MassCompile Operation
102
+
2. Run LabVIEWCLI VI Analyzer Operation
103
+
3. Exit with error is any of the above operation fail.
104
+
105
+
### GitHub Action
106
+
The configuration file for example GitHub Action is located here at: [labview-container-check.yml](../.github/workflows/labview-container-check.yml)
107
+
108
+
The action does the following:
109
+
1. Login into GitHub Container Registry
110
+
2. Pull in the image `labview:2025q3-linux`
111
+
3. Mount the repository into the container
112
+
4. Run the script `runlabview.sh` as container's entrypoint.
113
+
114
+
The action is set to be triggered when any pull request is created, updated or reopened.
115
+
116
+
### Running the GitHub Action
117
+
A testing Pull Request has been created that demonstrates the use of the script `runlabview.sh` and the GitHub Action to run LabVIEWCLI inside a container.
118
+
119
+
Link to the Pull Request: [Integration into CI/CD](https://github.com/ni/labview-for-containers/pull/8)
120
+
121
+
- When a Pull Request is opened, a status check running the GitHub Action can be seen.
122
+

123
+
124
+
- If we navigate to the run logs by clicking on the Action, we can see what all jobs were executed as part of this pipeline.
125
+

126
+
127
+
- Expanding the job shows the full log of that particular step.
128
+

129
+
130
+
The Complete run can be found [here.](https://github.com/ni/labview-for-containers/actions/runs/16333422879/job/46140796978?pr=5)
131
+
132
+
___
133
+
134
+
Feel free to tailor the workflow to your needs—add or remove jobs, adjust environment variables, or modify volume mounts. You can also use the provided YAML definitions as a springboard for your own CI/CD pipelines. This example is meant as a reference implementation to help you quickly integrate LabVIEWCLI commands into your automated workflows.
0 commit comments