-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4726f4a
commit f89fa1d
Showing
11 changed files
with
370 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "nuget" # See documentation for possible values | ||
# directory: "/" | ||
directories: # Use this if you have no .sln file in your root. | ||
- "*" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
# FluentAssertions equal to or higher than 8.0.0 are a different license, which requires payment | ||
- dependency-name: "FluentAssertions" | ||
versions: [ ">=8.0.0" ] | ||
|
||
# DevPacks represents the DMA on which to compile. Doesn't make sense to always be on the latest version. | ||
- dependency-name: "Skyline.DataMiner.Files.*" | ||
- dependency-name: "Skyline.DataMiner.Dev.*" | ||
groups: | ||
all-dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Skyline Reusable Quality Workflow | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [] | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | ||
- "[0-9]+.[0-9]+.[0-9]+.[0-9]+-**" | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
- "[0-9]+.[0-9]+.[0-9]+-**" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
CI: | ||
uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/DataMiner App Packages Master Workflow.yml@main | ||
with: | ||
configuration: Release | ||
referenceName: ${{ github.ref_name }} | ||
runNumber: ${{ github.run_number }} | ||
referenceType: ${{ github.ref_type }} | ||
repository: ${{ github.repository }} | ||
owner: ${{ github.repository_owner }} | ||
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. | ||
# solutionFilterName: "MySolutionFilter.slnf" | ||
secrets: | ||
dataminerToken: ${{ secrets.DATAMINER_TOKEN }} # The API key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. | ||
sonarCloudToken: ${{ secrets.SONAR_TOKEN }} # The API key for access to SonarCloud. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.12.35707.178 d17.12 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TCAGQISource", "TCAGQISource\TCAGQISource.csproj", "{477E2D2C-D949-41E9-B47E-E5AD4EAF69BD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{477E2D2C-D949-41E9-B47E-E5AD4EAF69BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{477E2D2C-D949-41E9-B47E-E5AD4EAF69BD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{477E2D2C-D949-41E9-B47E-E5AD4EAF69BD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{477E2D2C-D949-41E9-B47E-E5AD4EAF69BD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TCAGQISource | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# [Required] | ||
# Possible values for the Catalog item that can be deployed on a DataMiner System: | ||
# - Automation: If the Catalog item is a general-purpose DataMiner Automation script. | ||
# - Ad Hoc Data Source: If the Catalog item is a DataMiner Automation script designed for an ad hoc data source integration. | ||
# - ChatOps Extension: If the Catalog item is a DataMiner Automation script designed as a ChatOps extension. | ||
# - Connector: If the Catalog item is a DataMiner XML connector. | ||
# - Custom Solution: If the Catalog item is a DataMiner Solution. | ||
# - Data Query: If the Catalog item is a GQI data query. | ||
# - 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. | ||
# - Dashboard: If the Catalog item is a DataMiner dashboard. | ||
# - DevTool: If the Catalog item is a DevTool. | ||
# - Learning & Sample: If the Catalog item is a sample. | ||
# - Product Solution: If the Catalog item is a DataMiner Solution that is an out-of-the-box solution for a specific product. | ||
# - Scripted Connector: If the Catalog item is a DataMiner scripted connector. | ||
# - 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. | ||
# - System Health: If the Catalog item is intended to monitor the health of a system. | ||
# - User-Defined API: If the Catalog item is a DataMiner Automation script designed as a user-defined API. | ||
# - Visual Overview: If the Catalog item is a Microsoft Visio design. | ||
# | ||
type: Custom Solution | ||
# [Required] | ||
# The ID of the Catalog item. | ||
# All registered versions for the same ID are shown together in the Catalog. | ||
# This ID cannot be changed. | ||
# If the ID is not filled in, the registration will fail with HTTP status code 500. | ||
# If the ID is filled in but does not exist yet, a new Catalog item will be registered with this ID. | ||
# If the ID is filled in but does exist, properties of the item will be overwritten. | ||
# Must be a valid GUID. | ||
id: 3b0849f1-9d2f-428b-b7fc-663d52d3f40f | ||
# [Required] | ||
# The human-friendly name of the Catalog item. | ||
# Can be changed at any time. | ||
# Max length: 100 characters. | ||
# Cannot contain newlines. | ||
# Cannot contain leading or trailing whitespace characters. | ||
title: TCAGQISource | ||
# [Optional] | ||
# General information about the Catalog item. | ||
# Max length: 100,000 characters | ||
short_description: This is a custom solution for DataMiner. | ||
# [Optional] | ||
# A valid URL that points to the source code. | ||
# A valid URL | ||
# Max length: 2048 characters | ||
# Note: When Skyline Communications Reusable GitHub workflows are used, this will be automatically filled in. | ||
source_code_url: | ||
# [Optional] | ||
# A valid URL that points to documentation. | ||
# A valid URL | ||
# Max length: 2048 characters | ||
# Note: When Skyline Communications Reusable GitHub workflows are used, this will be automatically filled in. | ||
documentation_url: | ||
# [Optional] | ||
# People who are responsible for this Catalog item. Might be developers, but this is not required. | ||
# Format: 'name <email> (URL)' | ||
# The name is required; max 256 characters. | ||
# The email and URL are optional, and should be in valid email/URL formats. | ||
owners: | ||
- name: 'TCA' | ||
# [Optional] | ||
# Tags that allow you to categorize your Catalog items. | ||
# Max number of tags: 5 | ||
# Max length: 50 characters. | ||
# Cannot contain newlines. | ||
# Cannot contain leading or trailing whitespace characters. | ||
tags: | ||
- dataminer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Getting Started with Skyline DataMiner DevOps | ||
|
||
Welcome to the Skyline DataMiner DevOps environment! | ||
This quick-start guide will help you get up and running. It was auto-generated based on the initial project setup during creation. | ||
For more details and comprehensive instructions, please visit [DataMiner Docs](https://docs.dataminer.services/). | ||
|
||
## Creating a DataMiner Application Package | ||
|
||
This project was configured to create a `.dmapp` file every time you build the project. | ||
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. | ||
|
||
When you publish the project (see Publishing topic below), a corresponding item will be created in the online DataMiner Catalog. | ||
|
||
## Migrating to a Multi-Artifact DataMiner Application Package | ||
|
||
If you need to combine additional components in your `.dmapp` file, you should: | ||
|
||
1. Open the `TCAGQISource.csproj` file and ensure the `<GenerateDataminerPackage>` property is set to `False`. | ||
|
||
2. Right-click your solution and select **Add > New Project**. | ||
|
||
3. Select the **Skyline DataMiner Package Project** template. | ||
|
||
Follow the provided **Getting Started** guide in the new project for further instructions. | ||
|
||
## Publishing to the Catalog | ||
|
||
This project was created with support for publishing to the DataMiner Catalog. | ||
You can publish your artifact either manually via the Visual Studio IDE or by setting up a CI/CD workflow. | ||
|
||
## Publishing to the Catalog with Complete CI/CD Workflow | ||
|
||
This project includes a comprehensive GitHub workflow that adheres to Skyline Communications' quality standards, including static code analysis, custom validation, and unit testing. | ||
|
||
### Prerequisite | ||
|
||
You need a **SonarCloud Organization**. If you don’t have one, you can create it [here](https://sonarcloud.io/create-organization). | ||
|
||
### Steps | ||
|
||
1. Create a GitHub repository by going to **Git > Create Git Repository**, selecting GitHub, and filling in the wizard before clicking **Create and Push**. | ||
|
||
1. In GitHub, go to the *Actions* tab. | ||
|
||
1. Click the workflow run that failed (usually called *Add project files*). | ||
|
||
1. Click the "build" step that failed and read the failing error. | ||
|
||
``` text | ||
Error: DATAMINER_TOKEN is not set. Release not possible! | ||
Please create or re-use an admin.dataminer.services token by visiting: https://admin.dataminer.services/. | ||
Navigate to the right Organization then go to Keys and create/find a key with permissions to Register Catalog Items. | ||
Copy the value of the token. | ||
Then set a DATAMINER_TOKEN secret in your repository settings: **Dynamic Link** | ||
``` | ||
|
||
You can use the links from the actual error to better address the next couple of steps. | ||
|
||
1. Obtain an **Organization Key** from [admin.dataminer.services](https://admin.dataminer.services/) with the following scopes: | ||
- **Register Catalog items** | ||
- **Read Catalog items** | ||
|
||
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. | ||
|
||
1. Re-run the workflow. | ||
|
||
The following secrets and variables will have been added to your repository after all issues are resolved: | ||
|
||
| Name | Type | Description | Setup Guide | | ||
|-----------------|---------|----------------------------------------------------|---------------------------------------------------------------------------------------------| | ||
| `DATAMINER_TOKEN` | Secret | Organization key for publishing to the Catalog | Obtain from [admin.dataminer.services](https://admin.dataminer.services/) and add it as a secret. | | ||
| `SONAR_TOKEN` | Secret | Token for SonarCloud authentication | Obtain from [SonarCloud Security](https://sonarcloud.io/account/security) and add it as a secret. | | ||
| `SONAR_NAME` | Variable | SonarCloud project ID | Visit [SonarCloud](https://sonarcloud.io/projects/create), copy the project ID, and add it as a variable. | | ||
|
||
### Releasing a Version | ||
|
||
1. Navigate to the **<> Code** tab in your GitHub repository. | ||
|
||
1. In the menu on the right, select **Releases**. | ||
|
||
1. Create a new release, select the desired version as a **tag**, and provide a title and description. | ||
|
||
> [!NOTE] | ||
> The description will be visible in the DataMiner Catalog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
using System; | ||
using Skyline.DataMiner.Analytics.GenericInterface; | ||
|
||
namespace TCAGQISource | ||
{ | ||
/// <summary> | ||
/// Represents a data source. | ||
/// See: https://aka.dataminer.services/gqi-external-data-source for a complete example. | ||
/// </summary> | ||
[GQIMetaData(Name = "TCAGQISource")] | ||
public sealed class TCAGQISource : IGQIDataSource | ||
, IGQIOnInit | ||
, IGQIInputArguments | ||
, IGQIOnPrepareFetch | ||
, IGQIUpdateable | ||
, IGQIOnDestroy | ||
{ | ||
public OnInitOutputArgs OnInit(OnInitInputArgs args) | ||
{ | ||
// Initialize the data source | ||
// See: https://aka.dataminer.services/igqioninit-oninit | ||
return default; | ||
} | ||
|
||
public GQIArgument[] GetInputArguments() | ||
{ | ||
// Define data source input arguments | ||
// See: https://aka.dataminer.services/igqiinputarguments-getinputarguments | ||
return Array.Empty<GQIArgument>(); | ||
} | ||
|
||
public OnArgumentsProcessedOutputArgs OnArgumentsProcessed(OnArgumentsProcessedInputArgs args) | ||
{ | ||
// Process input argument values | ||
// See: https://aka.dataminer.services/igqiinputarguments-onargumentsprocessed | ||
return default; | ||
} | ||
|
||
public GQIColumn[] GetColumns() | ||
{ | ||
// Define data source columns | ||
// See: https://aka.dataminer.services/igqidatasource-getcolumns | ||
return Array.Empty<GQIColumn>(); | ||
} | ||
|
||
public OnPrepareFetchOutputArgs OnPrepareFetch(OnPrepareFetchInputArgs args) | ||
{ | ||
// Prepare data source for fetching | ||
// See: https://aka.dataminer.services/igqionpreparefetch-onpreparefetch | ||
return default; | ||
} | ||
|
||
public void OnStartUpdates(IGQIUpdater updater) | ||
{ | ||
// Enable the data source to send updates | ||
// See: https://aka.dataminer.services/igqiupdateable-onstartupdates | ||
} | ||
|
||
public GQIPage GetNextPage(GetNextPageInputArgs args) | ||
{ | ||
// Define data source rows | ||
// See: https://aka.dataminer.services/igqidatasource-getnextpage | ||
return new GQIPage(Array.Empty<GQIRow>()) | ||
{ | ||
HasNextPage = false, | ||
}; | ||
} | ||
|
||
public void OnStopUpdates() | ||
{ | ||
// Stop sending updates | ||
// See: https://aka.dataminer.services/igqiupdateable-onstopupdates | ||
} | ||
|
||
public OnDestroyOutputArgs OnDestroy(OnDestroyInputArgs args) | ||
{ | ||
// Clean up the data source | ||
// See: https://aka.dataminer.services/igqiondestroy-ondestroy | ||
return default; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Skyline.DataMiner.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net48</TargetFramework> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DataMinerType>AdHocDataSource</DataMinerType> | ||
<GenerateDataMinerPackage>True</GenerateDataMinerPackage> | ||
<Version>1.0.0</Version> | ||
<VersionComment>Initial Version</VersionComment> | ||
<!-- Do NOT fill in the Organization Token here. This points to either an Environment Variable skyline__sdk__catalogpublishtoken holding the organization token or a Visual Studio User Secret holding the token. --> | ||
<CatalogPublishKeyName>skyline:sdk:catalogpublishtoken</CatalogPublishKeyName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Skyline.DataMiner.Dev.Automation" Version="10.4.4.2" /> | ||
<PackageReference Include="Skyline.DataMiner.Utils.SecureCoding.Analyzers" Version="1.2.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<DMSScript options="272" xmlns="http://www.skyline.be/automation"> | ||
<Name>TCAGQISource</Name> | ||
<Description></Description> | ||
<Type>Automation</Type> | ||
<Author>TCA</Author> | ||
<CheckSets>FALSE</CheckSets> | ||
<Folder></Folder> | ||
|
||
<Protocols> | ||
</Protocols> | ||
|
||
<Memory> | ||
</Memory> | ||
|
||
<Parameters> | ||
</Parameters> | ||
|
||
<Script> | ||
<Exe id="1" type="csharp"> | ||
<Value><![CDATA[[Project:TCAGQISource]]]></Value> | ||
<!--<Param type="debug">true</Param>--> | ||
<Param type="preCompile">true</Param> | ||
<Param type="libraryName">TCAGQISource</Param> | ||
<Message></Message> | ||
</Exe> | ||
</Script> | ||
</DMSScript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"msbuild-sdks": { | ||
"Skyline.DataMiner.Sdk": "1.0.3" | ||
} | ||
} |