Skip to content

Commit a2026e3

Browse files
authored
Merge pull request #30 from shivaCode-2/shivaCode-2-patch-1
Update README.md
2 parents a513589 + 5c3f5ff commit a2026e3

1 file changed

Lines changed: 186 additions & 2 deletions

File tree

README.md

Lines changed: 186 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,186 @@
1-
# linuxContainer
2-
Test repo to understand CI/CD Scenarios involving LabVIEW and Linux Container
1+
# LabVIEW Container Beta
2+
Welcome to the beta release of our containerized LabVIEW environment! This README provides instructions for getting started, running the container, and reporting feedback.
3+
4+
---
5+
## Table of Contents
6+
7+
- [Overview](#overview)
8+
- [Prerequisites](#prerequisites)
9+
- [Installation](#installation)
10+
- [Private Registry](#private-registry)
11+
- [Request Access](#request-access)
12+
- [Authenticate & Pull](#authenticate--pull)
13+
- [Run the Container (Interactive Shell)](#run-the-container-interactive-shell)
14+
- [Run LabVIEWCLI Operations](#run-labviewcli-operations)
15+
- [Example Usage](#example-usage)
16+
- [Pulling in the image](#pulling-in-the-image)
17+
- [Running the image in interactive mode](#running-the-image-in-interactive-mode)
18+
- [Executing MassCompile using LabVIEWCLI](#executing-masscompile-using-labviewcli)
19+
- [Integration with CI/CD workflows](#integration-with-cicd-workflows)
20+
- [Repo Structure](#repo-structure)
21+
- [Integrating LabVIEWCLI Tests into Your CI Pipeline (Example)](#integrating-labviewcli-tests-into-your-ci-pipeline-example)
22+
- [FAQs](#faqs)
23+
- [1. How do I get access to the private container image?](#1-how-do-i-get-access-to-the-private-container-image)
24+
- [2. Which LabVIEW versions are supported inside the container?](#2-which-labview-versions-are-supported-inside-the-container)
25+
- [3. Can I add my own VIs to the CI workflow?](#3-can-i-add-my-own-vis-to-the-ci-workflow)
26+
- [4. How do I customize the GitHub Actions workflow?](#4-how-do-i-customize-the-github-actions-workflow)
27+
- [5. What system resources does the container require?](#5-what-system-resources-does-the-container-require)
28+
- [6. Who should I contact for support or to report bugs?](#6-who-should-i-contact-for-support-or-to-report-bugs)
29+
- [Licensing Agreement](#licensing-agreement)
30+
31+
32+
## Overview
33+
Pull and run the `labview_linux:2025q3_beta` image directly in your own environment. We will add you as a contributor on the private GitHub Package Registry so you can authenticate and download the image as needed.
34+
35+
## Prerequisites
36+
- Docker Engine (version 20.10+)
37+
- At least 8 GB RAM and 4 CPU cores available
38+
- Internet connection for downloading the container image
39+
- Git
40+
41+
## Installation
42+
1. **Private Registry**
43+
The LabVIEW Linux image is hosted privately on GitHub Container Registry (`ghcr.io`).
44+
45+
2. **Request Access**
46+
Email your GitHub username to `shivang.sharma@emerson.com`. We’ll grant you “read” permissions for the `labview_linux` package.
47+
48+
3. **Authenticate & Pull**
49+
```bash
50+
# Log in to GHCR
51+
docker login ghcr.io -u <your-github-username>
52+
# Enter a Personal Access Token (with at least read:packages scope) when prompted
53+
54+
# Pull the beta image
55+
docker pull ghcr.io/shivacode-2/labview_linux:2025q3_beta
56+
```
57+
4. **Run the Container (Interactive Shell)**
58+
```bash
59+
docker run --rm -it ghcr.io/shivacode-2/labview_linux:2025q3_beta
60+
```
61+
This command launches the container and drops you straight into a Bash shell—no volume mounts or network settings required.
62+
5. **Run LabVIEWCLI Operations**
63+
Once inside the container shell, execute any `labviewcli` command.
64+
65+
## Example Usage
66+
### Pulling in the image
67+
```bash
68+
docker pull ghcr.io/shivacode-2/labview_linux:2025q3_beta
69+
```
70+
![image](https://github.com/user-attachments/assets/054826e4-fec9-424e-a209-69499db298d4)
71+
72+
### Running the image in interactive mode
73+
```bash
74+
docker run -it ghcr.io/shivacode-2/labview_linux:2025q3_beta
75+
```
76+
![image](https://github.com/user-attachments/assets/8e413608-d59e-4522-adc5-0df64df08ccf)
77+
78+
### Executing MassCompile using LabVIEWCLI
79+
```bash
80+
# Inside Container
81+
LabVIEWCLI -OperationName MassCompile -DirectoryToCompile /usr/local/natinst/LabVIEW-2025-64/examples/Arrays -LogToConsole TRUE -LabVIEWPath /usr/local/natinst/LabVIEW-2025-64/labviewprofull
82+
```
83+
![image](https://github.com/user-attachments/assets/09fc35e9-c33b-448d-ac37-2ef84c37a396)
84+
85+
### Integration with CI/CD workflows
86+
You can use this repository as an example of how to integrate a LabVIEWCLI Docker image into your CI/CD workflows, such as GitHub Actions. Essentially, this repository serves as a practical demonstration of how to:
87+
1. Run LabVIEWCLI commands within a Docker container: This shows you how to encapsulate your LabVIEWCLI operations in a consistent and isolated environment.
88+
2. Leverage built-in GitHub Actions and helper scripts: The repository provides pre-configured workflows and scripts that illustrate how to automate tasks involving the LabVIEWCLI Docker image in a CI/CD pipeline.
89+
By exploring this repository, you can gain insights into setting up and running LabVIEWCLI-based processes as part of your automated build, test, and deployment strategies.
90+
91+
#### Repo Structure
92+
93+
- **Test-VIs/**
94+
A collection of sample VIs used by the CI pipeline for MassCompile and VI Analyzer tests. You can add, remove, or reorganize VIs here to include your own test cases.
95+
96+
- **runlabview.sh**
97+
The entry-point script that invokes `labviewcli` inside the container. By default it runs:
98+
1. **MassCompile** on all VIs under `Test-VIs/`
99+
2. **VIAnalyzer** against a predefined project
100+
Feel free to extend or replace these commands to suit your workflows.
101+
102+
- **.github/workflows/vi-analyzer-container.yml**
103+
Defines the GitHub Actions pipeline:
104+
1. **Authenticate** with GitHub Container Registry
105+
2. **Pull** the `labview_linux:2025q3_beta` image
106+
3. **Mount** the repository into the container
107+
4. **Run** `runlabview.sh` and capture test results
108+
5. **Report** pass/fail status back to the PR checks
109+
110+
#### Integrating LabVIEWCLI Tests into Your CI Pipeline (Example)
111+
This section demonstrates how you can leverage this repository to integrate LabVIEWCLI-driven tests into your Continuous Integration (CI) pipeline. It provides a practical example of setting up and running LabVIEWCLI tests automatically as part of your development workflow.
112+
113+
1. **Fork the repository**
114+
- Visit: `https://github.com/shivaCode-2/linuxContainer`
115+
- Click **Fork** to create your own copy.
116+
117+
2. **Clone your fork locally**
118+
```bash
119+
git clone https://github.com/<your-username>/linuxContainer.git
120+
cd linuxContainer
121+
```
122+
123+
3. **Create a feature branch**
124+
```bash
125+
git checkout -b my-ci-test
126+
```
127+
Make any changes you like—add or update VIs under Test-VIs/, tweak runlabview.sh, etc.
128+
129+
4. **Push your branch**
130+
```bash
131+
git push origin my-ci-test
132+
```
133+
134+
5. **Open a Pull Request**
135+
- In your fork on GitHub, click Compare & pull request.
136+
- Target branch: `shivaCode-2/linuxContainer:main`
137+
138+
6. **Watch the CI pipeline**
139+
The “Run VI Analyzer” workflow will automatically:
140+
- Authenticate to GHCR
141+
- Pull labview_linux:2025q3_beta
142+
- Mount your repo and execute runlabview.sh
143+
- Report pass/fail in the PR checks-
144+
145+
7. **Review results & iterate**
146+
- Click the Actions tab or PR checks to see logs.
147+
- Update your scripts or VIs, push new commits, and watch the workflow run again.
148+
149+
8. **Customize for your needs**
150+
- Modify runlabview.sh to add/remove CLI commands.
151+
- Edit `.github/workflows/vi-analyzer-container.yml` to adjust jobs, environment variables, or matrix settings.
152+
153+
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 repository is meant as a reference implementation to help you quickly integrate LabVIEWCLI commands into your automated workflows.
154+
155+
## FAQs
156+
### 1. How do I get access to the private container image?
157+
You need to be added as a contributor on the GitHub Packages feed. Simply email your GitHub username to `shivang.sharma@emerson.com` and we’ll grant you “read” rights. Once added, log in and pull with:
158+
```bash
159+
docker login ghcr.io -u <your-username>
160+
docker pull ghcr.io/shivacode-2/labview_linux:2025q3_beta
161+
```
162+
163+
### 2. Which LabVIEW versions are supported inside the container?
164+
The beta image bundles LabVIEW 2025 Q3. CLI commands (labviewcli) will only work on VIs built for LabVIEW 2025 or earlier.
165+
166+
### 3. Can I add my own VIs to the CI workflow?
167+
Yes. In your fork of linuxContainer, drop VIs into Test-VIs/ (or create subfolders), then update runlabview.sh with the new paths or operations. When you open a PR, the GitHub Action will run your tests automatically.
168+
169+
### 4. How do I customize the GitHub Actions workflow
170+
Edit `.github/workflows/vi-analyzer-container.yml`:
171+
1. Add or remove jobs under jobs
172+
2. Change CLI commands in the runlabview.sh
173+
3. Adjust mount points, environment variables, or matrix configurations as needed
174+
175+
### 5. What system resources does the container require?
176+
We recommend at least 8 GB RAM and 4 CPU cores for smooth MassCompile or VI Analyzer runs. You can adjust Docker’s resource allocation in your Docker Desktop (or engine) settings.
177+
178+
### 6. Who should I contact for support or to report bugs?
179+
1. Issues & feature requests: https://github.com/shivaCode-2/linuxContainer/issues
180+
2. Direct support: email shivang.sharma@emerson.com
181+
182+
## Licensing Agreement
183+
184+
185+
186+

0 commit comments

Comments
 (0)