Skip to content

Commit dcb7418

Browse files
The basics of what the UI should do
1 parent ce38dbb commit dcb7418

27 files changed

+1127
-109
lines changed

.github/workflows/codeql.yml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '41 6 * * 6'
21+
22+
jobs:
23+
build:
24+
name: Roslyn Compiler Warnings
25+
runs-on: [ self-hosted ]
26+
env:
27+
# Required for actions/setup-dotnet@v3 on self-hosted runners where runners don't have sudo permissions
28+
DOTNET_INSTALL_DIR: "./.dotnet"
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: 'recursive'
34+
35+
# Install the .NET Core workload
36+
- name: Install .NET Core
37+
uses: actions/setup-dotnet@v3
38+
with:
39+
dotnet-version: 8.x.x
40+
41+
# Execute the build
42+
- name: Execute Release Build
43+
working-directory: ./src
44+
run: dotnet build --configuration Release
45+
test:
46+
name: Tests
47+
runs-on: [ self-hosted ]
48+
env:
49+
# Required for actions/setup-dotnet@v3 on self-hosted runners where runners don't have sudo permissions
50+
DOTNET_INSTALL_DIR: "./.dotnet"
51+
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v4
54+
with:
55+
submodules: 'recursive'
56+
57+
# Install the .NET Core workload
58+
- name: Install .NET Core
59+
uses: actions/setup-dotnet@v3
60+
with:
61+
dotnet-version: 8.x.x
62+
63+
# Execute the tests
64+
- name: Execute Tests
65+
working-directory: ./src
66+
run: dotnet test
67+
68+
code-ql:
69+
name: Analyze
70+
# Runner size impacts CodeQL analysis time. To learn more, please see:
71+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
72+
# - https://gh.io/supported-runners-and-hardware-resources
73+
# - https://gh.io/using-larger-runners
74+
# Consider using larger runners for possible analysis time improvements.
75+
runs-on: [ self-hosted ]
76+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
77+
permissions:
78+
# required for all workflows
79+
security-events: write
80+
81+
# only required for workflows in private repositories
82+
actions: read
83+
contents: read
84+
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
language: [ 'csharp' ]
89+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
90+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
91+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
92+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
93+
env:
94+
# Required for actions/setup-dotnet@v3 on self-hosted runners where runners don't have sudo permissions
95+
DOTNET_INSTALL_DIR: "./.dotnet"
96+
steps:
97+
- name: Checkout repository
98+
uses: actions/checkout@v4
99+
with:
100+
submodules: 'recursive'
101+
102+
# Initializes the CodeQL tools for scanning.
103+
- name: Initialize CodeQL
104+
uses: github/codeql-action/init@v3
105+
with:
106+
languages: ${{ matrix.language }}
107+
# If you wish to specify custom queries, you can do so here or in a config file.
108+
# By default, queries listed here will override any specified in a config file.
109+
# Prefix the list here with "+" to use these queries and those in the config file.
110+
111+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
112+
# queries: security-extended,security-and-quality
113+
114+
115+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
116+
# If this step fails, then you should remove it and run the build manually (see below)
117+
# - name: Autobuild
118+
# uses: github/codeql-action/autobuild@v3
119+
# Install the .NET Core workload
120+
- name: Install .NET Core
121+
uses: actions/setup-dotnet@v3
122+
with:
123+
dotnet-version: 8.x.x
124+
125+
# Execute the build
126+
- name: Execute Build
127+
working-directory: ./src
128+
run: dotnet build
129+
130+
# ℹ️ Command-line programs to run using the OS shell.
131+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
132+
133+
# If the Autobuild fails above, remove it and uncomment the following three lines.
134+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
135+
136+
# - run: |
137+
# echo "Run, Build Application using script"
138+
# ./location_of_script_within_repo/buildscript.sh
139+
140+
- name: Perform CodeQL Analysis
141+
uses: github/codeql-action/analyze@v3
142+
with:
143+
category: "/language:${{matrix.language}}"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/nullinside-api"]
2+
path = src/nullinside-api
3+
url = https://github.com/nullinside-development-group/nullinside-api.git

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ WORKDIR /app
44

55
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
66
ARG BUILD_CONFIGURATION=Release
7+
ARG TAG_VERSION
78
WORKDIR /src
89
COPY ["src/SiteMonitor/SiteMonitor.csproj", "src/SiteMonitor/"]
910
RUN dotnet restore "src/SiteMonitor/SiteMonitor.csproj"
1011
COPY src/ .
1112
WORKDIR "/src/SiteMonitor"
12-
RUN dotnet build "SiteMonitor.csproj" -c $BUILD_CONFIGURATION -o /app/build
13+
RUN dotnet build "SiteMonitor.csproj" -p:Version="$TAG_VERSION" -c $BUILD_CONFIGURATION -o /app/build
1314

1415
FROM build AS publish
1516
ARG BUILD_CONFIGURATION=Release
@@ -19,8 +20,8 @@ ARG DESCRIPTION
1920
RUN apt-get update && apt-get dist-upgrade -y && apt-get install zip jq -y
2021

2122
# Generate the executables
22-
RUN dotnet publish "SiteMonitor.csproj" -c $BUILD_CONFIGURATION -o /app/publish/win-x64 -r win-x64
23-
RUN dotnet publish "SiteMonitor.csproj" -c $BUILD_CONFIGURATION -o /app/publish/win-x86 -r win-x86
23+
RUN dotnet publish "SiteMonitor.csproj" -p:Version="$TAG_VERSION" -c $BUILD_CONFIGURATION -o /app/publish/win-x64 -r win-x64
24+
RUN dotnet publish "SiteMonitor.csproj" -p:Version="$TAG_VERSION" -c $BUILD_CONFIGURATION -o /app/publish/win-x86 -r win-x86
2425
RUN cd /app/publish/win-x64 && zip -r ../windows-x64.zip *
2526
RUN cd /app/publish/win-x86 && zip -r ../windows-x86.zip *
2627

@@ -39,7 +40,6 @@ RUN curl -L \
3940
RUN export RELEASE_ID=$(curl -L \
4041
-H "Accept: application/vnd.github+json" \
4142
-H "Authorization: Bearer $GITHUB_TOKEN" \
42-
-H "X-GitHub-Api-Version: 2022-11-28" \
4343
"https://api.github.com/repos/nullinside-development-group/nullinside-site-monitor/releases/latest" \
4444
| jq .id) && \
4545
echo "Release ID: "$RELEASE_ID && \

go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ if [[ -z "$TAG_VERSION" ]]; then
2222
fi
2323

2424
docker system prune -af
25-
docker build --build-arg="TAG_VERSION=v"$TAG_VERSION --build-arg="GITHUB_TOKEN="$GITHUB_NULLINSIDE_ORG_RELEASE_TOKEN --progress=plain --no-cache .
25+
docker build --build-arg="TAG_VERSION="$TAG_VERSION --build-arg="GITHUB_TOKEN="$GITHUB_NULLINSIDE_ORG_RELEASE_TOKEN --progress=plain --no-cache .

src/SiteMonitor.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFolder", "SolutionF
1111
..\Jenkinsfile = ..\Jenkinsfile
1212
EndProjectSection
1313
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nullinside.Api.Common", "nullinside-api\src\Nullinside.Api.Common\Nullinside.Api.Common.csproj", "{D9EF6294-DF13-4901-B7EF-2DBC50B9E4E1}"
15+
EndProject
1416
Global
1517
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1618
Debug|Any CPU = Debug|Any CPU
@@ -21,5 +23,9 @@ Global
2123
{9C6BE74C-22B4-4A81-91EA-32204163F8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
2224
{9C6BE74C-22B4-4A81-91EA-32204163F8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
2325
{9C6BE74C-22B4-4A81-91EA-32204163F8EE}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{D9EF6294-DF13-4901-B7EF-2DBC50B9E4E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{D9EF6294-DF13-4901-B7EF-2DBC50B9E4E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{D9EF6294-DF13-4901-B7EF-2DBC50B9E4E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{D9EF6294-DF13-4901-B7EF-2DBC50B9E4E1}.Release|Any CPU.Build.0 = Release|Any CPU
2430
EndGlobalSection
2531
EndGlobal

0 commit comments

Comments
 (0)