Skip to content

Commit

Permalink
Feature/port from easify (#1)
Browse files Browse the repository at this point in the history
* Initial port of the code

* Prepare project for the first release

* Upgade the packages to the latest

* Replace the builds

* Added missing icons and configurations

* Added the icon to the project

* Remove the logo from serilog

* Remove the logo

* Update the project files to the right project targets

* Remove logo from all projects due to the error on build
  • Loading branch information
moattarwork authored Jan 8, 2023
1 parent 56fd3d6 commit e354aea
Show file tree
Hide file tree
Showing 26 changed files with 157 additions and 130 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: CI on Branches and PRs

on:
workflow_dispatch:
branches-ignore: [ master ]
branches-ignore: [master]
paths: "src/**"

push:
branches-ignore: [ master ]
branches-ignore: [master]
paths: "src/**"

pull_request:
branches: [ master ]
branches: [master]
paths: "src/**"

jobs:
Expand All @@ -24,11 +24,11 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.5.x"
versionSpec: "5.8.x"
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: "3.1.x"
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore src
- name: Use GitVersion
Expand All @@ -49,6 +49,6 @@ jobs:
name: nuget-packages
path: "**/*.nupkg"
- name: Configure github as Package Repository
run: dotnet nuget add source https://nuget.pkg.github.com/icgam/index.json -n "github"
run: dotnet nuget add source https://nuget.pkg.github.com/LittleBlocks/index.json -n "github"
- name: Publish the package to GitHub Packages
run: dotnet nuget push "**/*.nupkg" -s "github" -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
36 changes: 22 additions & 14 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
paths:
- "src/**"
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
paths:
- "src/**"
schedule:
- cron: '31 22 * * 5'
- cron: '0 13 * * 0'

jobs:
analyze:
Expand All @@ -28,22 +26,32 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['csharp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Release build on master/main

on:
workflow_dispatch:
branches: [ master ]
branches: [master]
paths: "src/**"
push:
branches: [ master ]
branches: [master]
paths: "src/**"

jobs:
Expand All @@ -19,11 +19,11 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.5.x"
versionSpec: "5.8.x"
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: "3.1.x"
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore src
- name: Use GitVersion
Expand Down
8 changes: 8 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
next-version: 1.0.0
mode: Mainline
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
ignore:
commits-before: 2023-01-01T00:00:00
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Easify - Azure
LittleBlocks - Azure
============

![Release](https://github.com/icgam/Easify.Azure/workflows/Release%20build%20on%20master/main/badge.svg) ![CI](https://github.com/icgam/Easify.Azure/workflows/CI%20on%20Branches%20and%20PRs/badge.svg) ![](https://img.shields.io/nuget/v/Easify.Azure.AspNetCore.AppInsights.svg?style=flat-square)
![Release](https://github.com/LittleBlocks/LittleBlocks.Azure/workflows/Release%20build%20on%20master/main/badge.svg) ![CI](https://github.com/LittleBlocks/LittleBlocks.Azure/workflows/CI%20on%20Branches%20and%20PRs/badge.svg) ![](https://img.shields.io/nuget/v/LittleBlocks.Azure.AspNetCore.AppInsights.svg?style=flat-square)


The repository contains a set of libraries to facilitate the development of Azure Cloud. This is an extension to the Easify framework but it is covering the integration with the services in Azure.
The repository contains a set of libraries to facilitate the development of Azure Cloud. This is an extension to the LittleBlocks framework but it is covering the integration with the services in Azure.

## Get Started

The repository consists of the following components:

- **Easify.Azure.AspNetCore.AppInsights**: Provide extensions and components to automate integration with Azure AppInsights
- **LittleBlocks.Azure.AspNetCore.AppInsights**: Provide extensions and components to automate integration with Azure AppInsights


### How to use

Detail information on how to use the libraries can be found [here](https://github.com/icgam/Easify.Azure/wiki)
Detail information on how to use the libraries can be found [here](https://github.com/LittleBlocks/LittleBlocks.Azure/wiki)

### How to Engage, Contribute, and Give Feedback

Expand All @@ -33,6 +33,6 @@ Security issues and bugs should be reported by creating the relevant features an

## Related projects

- [Easify](https://github.com/icgam/Easify)
- [Easify.Ef](https://github.com/icgam/Easify.Ef)
- [Easify.Templates](https://github.com/icgam/Easify.Templates)
- [LittleBlocks](https://github.com/LittleBlocks/LittleBlocks.API)
- [LittleBlocks.Ef](https://github.com/LittleBlocks/LittleBlocks.Ef)
- [LittleBlocks.Templates](https://github.com/LittleBlocks/LittleBlocks.Templates)

This file was deleted.

19 changes: 0 additions & 19 deletions src/Easify.Azure.AspNetCore/Easify.Azure.AspNetCore.csproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This software is part of the Easify framework
// Copyright (C) 2019 Intermediate Capital Group
// This software is part of the LittleBlocks framework
// Copyright (C) 2019 LittleBlocks
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand All @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using Easify.Configurations;
using LittleBlocks.Configurations;
using FluentAssertions;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
Expand All @@ -24,10 +24,10 @@
using Microsoft.Extensions.Options;
using NSubstitute;
using Xunit;
using Environment = Easify.Configurations.Environment;
using Environment = LittleBlocks.Configurations.Environment;


namespace Easify.Azure.AspNetCore.AppInsights.UnitTests
namespace LittleBlocks.Azure.AspNetCore.AppInsights.UnitTests
{
public class ApplicationInfoTelemetryInitializerTests
{
Expand All @@ -41,7 +41,7 @@ public void Should_Initialize_ConfigureTheTelemetryCorrectly()
services.AddOptions<Application>().Configure(a =>
{
a.Environment = new Environment {Name = "Development"};
a.Name = "Easify Azure";
a.Name = "LittleBlocks Azure";
});

var sp = services.BuildServiceProvider();
Expand All @@ -53,8 +53,8 @@ public void Should_Initialize_ConfigureTheTelemetryCorrectly()
sut.Initialize(telemetry);

//Assert
telemetry.Context.Cloud.RoleName.Should().Be("Easify Azure-Development");
telemetry.Context.Cloud.RoleInstance.Should().Be("Easify Azure-Development-Instance");
telemetry.Context.Cloud.RoleName.Should().Be("LittleBlocks Azure-Development");
telemetry.Context.Cloud.RoleInstance.Should().Be("LittleBlocks Azure-Development-Instance");
}

public class MockTelemetry : ITelemetry
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>

<LangVersion>default</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Easify.Azure.AspNetCore.AppInsights\Easify.Azure.AspNetCore.AppInsights.csproj" />
<ProjectReference Include="..\LittleBlocks.Azure.AspNetCore.AppInsights\LittleBlocks.Azure.AspNetCore.AppInsights.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This software is part of the Easify framework
// Copyright (C) 2019 Intermediate Capital Group
// This software is part of the LittleBlocks framework
// Copyright (C) 2019 LittleBlocks
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand All @@ -19,7 +19,7 @@
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace Easify.Azure.AspNetCore.AppInsights.UnitTests
namespace LittleBlocks.Azure.AspNetCore.AppInsights.UnitTests
{
public class ServiceCollectionExtensionsTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This software is part of the Easify framework
// Copyright (C) 2019 Intermediate Capital Group
// This software is part of the LittleBlocks framework
// Copyright (C) 2019 LittleBlocks
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand All @@ -15,12 +15,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using Easify.Configurations;
using LittleBlocks.Configurations;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.Options;

namespace Easify.Azure.AspNetCore.AppInsights
namespace LittleBlocks.Azure.AspNetCore.AppInsights
{
public sealed class ApplicationInfoTelemetryInitializer : ITelemetryInitializer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This software is part of the Easify framework
// Copyright (C) 2019 Intermediate Capital Group
// This software is part of the LittleBlocks framework
// Copyright (C) 2019 LittleBlocks
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
Expand All @@ -14,7 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace Easify.Azure.AspNetCore.AppInsights
namespace LittleBlocks.Azure.AspNetCore.AppInsights
{
public interface ITelemetryConfigure
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Title>LittleBlocks.Azure.AspNetCore.AppInsights</Title>
<Authors>Mohammad Moattar</Authors>
<PackageProjectUrl>https://github.com/LittleBlocks/LittleBlocks.Azure</PackageProjectUrl>
<RepositoryUrl>https://github.com/LittleBlocks/LittleBlocks.Azure</RepositoryUrl>
<LangVersion>default</LangVersion>
<TargetFrameworks>net47;net5.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="LittleBlocks.Configurations" Version="1.0.2" />
</ItemGroup>

</Project>
Loading

0 comments on commit e354aea

Please sign in to comment.