Skip to content

Commit bcffa06

Browse files
Add project files.
1 parent 71eb422 commit bcffa06

23 files changed

+1439
-0
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 4
6+
tab_width = 4
7+
end_of_line = crlf
8+
trim_trailing_whitespace = true
9+
10+
[*.cs]
11+
dotnet_sort_system_directives_first = true

.github/dependabot.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget" # See documentation for possible values
9+
# directory: "/"
10+
directories: # Use this if you have no .sln file in your root.
11+
- "*"
12+
schedule:
13+
interval: "weekly"
14+
ignore:
15+
# FluentAssertions equal to or higher than 8.0.0 are a different license, which requires payment
16+
- dependency-name: "FluentAssertions"
17+
versions: [ ">=8.0.0" ]
18+
19+
# DevPacks represents the DMA on which to compile. Doesn't make sense to always be on the latest version.
20+
- dependency-name: "Skyline.DataMiner.Files.*"
21+
- dependency-name: "Skyline.DataMiner.Dev.*"
22+
groups:
23+
all-dependencies:
24+
patterns:
25+
- "*"

.github/workflows/complete.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Skyline Reusable Quality Workflow
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the master branch
6+
push:
7+
branches: []
8+
tags:
9+
- "[0-9]+.[0-9]+.[0-9]+.[0-9]+"
10+
- "[0-9]+.[0-9]+.[0-9]+.[0-9]+-**"
11+
- "[0-9]+.[0-9]+.[0-9]+"
12+
- "[0-9]+.[0-9]+.[0-9]+-**"
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
18+
jobs:
19+
20+
CI:
21+
uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/DataMiner App Packages Master Workflow.yml@main
22+
with:
23+
configuration: Release
24+
referenceName: ${{ github.ref_name }}
25+
runNumber: ${{ github.run_number }}
26+
referenceType: ${{ github.ref_type }}
27+
repository: ${{ github.repository }}
28+
owner: ${{ github.repository_owner }}
29+
sonarCloudProjectName: ${{ vars.SONAR_NAME }} # Go to 'https://sonarcloud.io/projects/create' and create a project. Then create a SONAR_NAME variable with the ID of the project as mentioned in the SonarCloud project URL.
30+
# solutionFilterName: "MySolutionFilter.slnf"
31+
secrets:
32+
dataminerToken: ${{ secrets.DATAMINER_TOKEN }} # The API key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain organization.
33+
sonarCloudToken: ${{ secrets.SONAR_TOKEN }} # The API key for access to SonarCloud.
34+
# overrideCatalogDownloadToken: ${{ secrets.OVERRIDE_DATAMINER_TOKEN }} # Override on the dataminerToken for downloading Catalog items: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain organization.

Directory.Build.props

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project>
2+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3+
<DebugType>full</DebugType>
4+
<CodeAnalysisRuleSet>..\Internal\Code Analysis\qaction-debug.ruleset</CodeAnalysisRuleSet>
5+
</PropertyGroup>
6+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
7+
<DebugType>pdbonly</DebugType>
8+
<CodeAnalysisRuleSet>..\Internal\Code Analysis\qaction-release.ruleset</CodeAnalysisRuleSet>
9+
</PropertyGroup>
10+
<ItemGroup>
11+
<AdditionalFiles Include="..\Internal\Code Analysis\stylecop.json">
12+
<Link>Properties\stylecop.json</Link>
13+
</AdditionalFiles>
14+
<Content Include="..\.editorconfig">
15+
<Link>Properties\.editorconfig</Link>
16+
</Content>
17+
</ItemGroup>
18+
<ItemGroup>
19+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
20+
<PrivateAssets>all</PrivateAssets>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
</PackageReference>
23+
</ItemGroup>
24+
</Project>

ISS Tracker.sln

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35312.102
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISS Tracker", "ISS Tracker\ISS Tracker.csproj", "{35C2E61D-1DEA-4200-B95D-F3F8FBF71866}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Internal", "Internal", "{29A11F66-EAAB-4C3B-8A92-D53E13A9C3E3}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Code Analysis", "Code Analysis", "{2E0B51CF-D97B-48A7-8E56-478FC503D24F}"
11+
ProjectSection(SolutionItems) = preProject
12+
Internal\Code Analysis\qaction-debug.ruleset = Internal\Code Analysis\qaction-debug.ruleset
13+
Internal\Code Analysis\qaction-release.ruleset = Internal\Code Analysis\qaction-release.ruleset
14+
Internal\Code Analysis\stylecop.json = Internal\Code Analysis\stylecop.json
15+
EndProjectSection
16+
EndProject
17+
Global
18+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
19+
Debug|Any CPU = Debug|Any CPU
20+
Release|Any CPU = Release|Any CPU
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{35C2E61D-1DEA-4200-B95D-F3F8FBF71866}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{35C2E61D-1DEA-4200-B95D-F3F8FBF71866}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{35C2E61D-1DEA-4200-B95D-F3F8FBF71866}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{35C2E61D-1DEA-4200-B95D-F3F8FBF71866}.Release|Any CPU.Build.0 = Release|Any CPU
27+
EndGlobalSection
28+
GlobalSection(SolutionProperties) = preSolution
29+
HideSolutionNode = FALSE
30+
EndGlobalSection
31+
GlobalSection(NestedProjects) = preSolution
32+
{2E0B51CF-D97B-48A7-8E56-478FC503D24F} = {29A11F66-EAAB-4C3B-8A92-D53E13A9C3E3}
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {9EE523C4-DF0B-41F8-AE51-B4DAECC42E1E}
36+
EndGlobalSection
37+
EndGlobal
34.6 KB
Loading
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ISS Tracker
2+
3+
![WIP](./Images/wip.png)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# [Required]
2+
# Possible values for the Catalog item that can be deployed on a DataMiner System:
3+
# - Automation: If the Catalog item is a general-purpose DataMiner Automation script.
4+
# - Ad Hoc Data Source: If the Catalog item is a DataMiner Automation script designed for an ad hoc data source integration.
5+
# - ChatOps Extension: If the Catalog item is a DataMiner Automation script designed as a ChatOps extension.
6+
# - Connector: If the Catalog item is a DataMiner XML connector.
7+
# - Custom Solution: If the Catalog item is a DataMiner Solution.
8+
# - Data Query: If the Catalog item is a GQI data query.
9+
# - Data Transformer: Includes a data transformer that enables you to modify data using a GQI data query before making it available to users in low-code apps or dashboards.
10+
# - Dashboard: If the Catalog item is a DataMiner dashboard.
11+
# - DevTool: If the Catalog item is a DevTool.
12+
# - Learning & Sample: If the Catalog item is a sample.
13+
# - Product Solution: If the Catalog item is a DataMiner Solution that is an out-of-the-box solution for a specific product.
14+
# - Scripted Connector: If the Catalog item is a DataMiner scripted connector.
15+
# - Standard Solution: If the Catalog item is a DataMiner Solution that is an out-of-the-box solution for a specific use case or application.
16+
# - System Health: If the Catalog item is intended to monitor the health of a system.
17+
# - User-Defined API: If the Catalog item is a DataMiner Automation script designed as a user-defined API.
18+
# - Visual Overview: If the Catalog item is a Microsoft Visio design.
19+
type: Custom Solution
20+
21+
# [Required]
22+
# The ID of the Catalog item.
23+
# All registered versions for the same ID are shown together in the Catalog.
24+
# This ID cannot be changed.
25+
# If the ID is not filled in, the registration will fail with HTTP status code 500.
26+
# If the ID is filled in but does not exist yet, a new Catalog item will be registered with this ID.
27+
# If the ID is filled in but does exist, properties of the item will be overwritten.
28+
# Must be a valid GUID.
29+
id: 9cab7b77-efa3-4865-86d2-92497a4ad1bb
30+
31+
# [Required]
32+
# The human-friendly name of the Catalog item.
33+
# Can be changed at any time.
34+
# Max length: 100 characters.
35+
# Cannot contain newlines.
36+
# Cannot contain leading or trailing whitespace characters.
37+
title: ISS Tracker
38+
39+
# [Optional]
40+
# General information about the Catalog item.
41+
# Max length: 100,000 characters
42+
short_description: This is a custom solution for DataMiner.
43+
44+
# [Optional]
45+
# A valid URL that points to the source code.
46+
# A valid URL
47+
# Max length: 2048 characters
48+
source_code_url:
49+
50+
# [Optional]
51+
# A valid URL that points to documentation.
52+
# A valid URL
53+
# Max length: 2048 characters
54+
documentation_url:
55+
56+
# [Optional]
57+
# People who are responsible for this Catalog item. Might be developers, but this is not required.
58+
# Format: 'name <email> (URL)'
59+
# The name is required; max 256 characters.
60+
# The email and URL are optional, and should be in valid email/URL formats.
61+
owners:
62+
- name: 'JAY'
63+
64+
# [Optional]
65+
# Tags that allow you to categorize your Catalog items.
66+
# Max number of tags: 5
67+
# Max length: 50 characters.
68+
# Cannot contain newlines.
69+
# Cannot contain leading or trailing whitespace characters.
70+
tags:
71+
- dataminer

ISS Tracker/GettingStarted.md

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Getting Started with Skyline DataMiner DevOps
2+
3+
Welcome to the Skyline DataMiner DevOps environment!
4+
This quick-start guide will help you get up and running.
5+
For more details and comprehensive instructions, please visit [DataMiner Docs](https://docs.dataminer.services/).
6+
7+
## Creating a DataMiner Application Package
8+
9+
This project is configured to create a `.dmapp` file every time you build the project.
10+
When you compile or build the project, you will find the generated `.dmapp` in the standard output folder, typically the `bin` folder of your project.
11+
12+
When you publish the project, a corresponding item will be created in the online DataMiner Catalog.
13+
14+
## The DataMiner Package Project
15+
16+
This project is designed to create multi-artifact packages in a straightforward manner.
17+
18+
### Adding Extra Artifacts in the Same Solution
19+
20+
You can right-click the solution and select **Add** and then **New Project**. This will allow you to select DataMiner project templates (e.g. adding additional Automation scripts).
21+
22+
> [!NOTE]
23+
> Connectors are currently not supported.
24+
25+
Every **Skyline.DataMiner.SDK** project, except other DataMiner package projects, will by default be included within the `.dmapp` created by this project.
26+
You can customize this behavior using the **PackageContent/ProjectReferences.xml** file. This allows you to add filters to include or exclude projects as needed.
27+
28+
### Adding Content from the Catalog
29+
30+
You can reference and include additional content from the Catalog using the **PackageContent/CatalogReferences.xml** file provided in this project.
31+
32+
1. Obtain an **Organization Key** from [admin.dataminer.services](https://admin.dataminer.services/) with the following scopes:
33+
- **Register catalog items**
34+
- **Read catalog items**
35+
- **Download catalog versions**
36+
37+
1. Securely store the key using Visual Studio User Secrets:
38+
39+
1. Right-click the project and select **Manage User Secrets**.
40+
41+
1. Add the key in the following format:
42+
43+
```json
44+
{
45+
"skyline": {
46+
"sdk": {
47+
"dataminertoken": "MyKeyHere"
48+
}
49+
}
50+
}
51+
```
52+
53+
### Importing from DataMiner
54+
55+
You can import specific items directly from a DataMiner Agent:
56+
57+
1. Connect to an Agent via **Extensions > DIS > DMA > Connect**.
58+
59+
1. If your Agent is not listed, add it by going to **Extensions > DIS > Settings** and clicking **Add** on the DMA tab.
60+
61+
1. Once connected, you can import specific DataMiner artifacts: in your **Solution Explorer**, navigate to folders such as **PackageContent/Dashboards** or **PackageContent/LowCodeApps**, right-click, select **Add**, and select **Import DataMiner Dashboard/Low Code App** or the equivalent.
62+
63+
## Executing Additional Code on Installation
64+
65+
Open the **ISS Tracker.cs** file to write custom installation code. Common actions include creating elements, services, or views.
66+
67+
**Quick tip:** Type `clGetDms` in the `.cs` file and press **Tab** twice to insert a snippet that gives you access to the **IDms** classes, making DataMiner manipulation easier.
68+
69+
## Does Your Installation Code Need Configuration Files?
70+
71+
You can add configuration files (e.g. `.json`, `.xml`) to the **SetupContent** folder, which can be accessed during installation.
72+
73+
Access them in your code using:
74+
75+
```csharp
76+
string setupContentPath = installer.GetSetupContentDirectory();
77+
```
78+
79+
80+
## Publishing to the Catalog
81+
82+
This project was created with support for publishing to the DataMiner Catalog.
83+
You can publish your artifact manually through Visual Studio or by setting up a CI/CD workflow.
84+
## Publishing to the Catalog with Complete CI/CD Workflow
85+
86+
This project includes a comprehensive GitHub workflow that adheres to Skyline Communications' quality standards, including static code analysis, custom validation, and unit testing.
87+
88+
### Prerequisite
89+
90+
You need a **SonarCloud Organization**. If you don’t have one, you can create it [here](https://sonarcloud.io/create-organization).
91+
92+
### Steps
93+
94+
1. Create a GitHub repository by going to **Git > Create Git Repository**, selecting GitHub, and filling in the wizard before clicking **Create and Push**.
95+
96+
1. In GitHub, go to the *Actions* tab.
97+
98+
1. Click the workflow run that failed (usually called *Add project files*).
99+
100+
1. Click the "build" step that failed and read the failing error.
101+
102+
``` text
103+
Error: DATAMINER_TOKEN is not set. Release not possible!
104+
Please create or re-use an admin.dataminer.services token by visiting: https://admin.dataminer.services/.
105+
Navigate to the right Organization then go to Keys and create/find a key with permissions to Register catalog items, Download catalog versions and Read catalog items..
106+
Copy the value of the token.
107+
Then set a DATAMINER_TOKEN secret in your repository settings: **Dynamic Link**
108+
```
109+
110+
You can use the links from the actual error to better address the next couple of steps.
111+
112+
1. Obtain an **Organization Key** from [admin.dataminer.services](https://admin.dataminer.services/) with the following scopes:
113+
- **Register catalog items**
114+
- **Read catalog items**
115+
- **Download catalog versions**
116+
117+
1. Add the key as a secret in your GitHub repository, by navigating to **Settings > Secrets and variables > Actions** and creating secrets or variables with the required names.
118+
119+
1. Re-run the workflow.
120+
121+
The following secrets and variables will have been added to your repository after all issues are resolved:
122+
123+
| Name | Type | Description | Setup Guide |
124+
|-----------------|---------|----------------------------------------------------|---------------------------------------------------------------------------------------------|
125+
| `DATAMINER_TOKEN` | Secret | Organization key for downloading/publishing from/to the Catalog | Obtain from [admin.dataminer.services](https://admin.dataminer.services/) and add it as a secret. |
126+
| `SONAR_TOKEN` | Secret | Token for SonarCloud authentication | Obtain from [SonarCloud Security](https://sonarcloud.io/account/security) and add it as a secret. |
127+
| `SONAR_NAME` | Variable | SonarCloud project ID | Visit [SonarCloud](https://sonarcloud.io/projects/create), copy the project ID, and add it as a variable. |
128+
129+
### Releasing a Version
130+
131+
1. Navigate to the **<> Code** tab in your GitHub repository.
132+
133+
1. In the menu on the right, select **Releases**.
134+
135+
1. Create a new release, select the desired version as a **tag**, and provide a title and description.
136+
137+
> [!NOTE]
138+
> The description will be visible in the DataMiner Catalog.

0 commit comments

Comments
 (0)