initial solution creation
This commit is contained in:
parent
449c9df9df
commit
18124da30f
18
.config/dotnet-tools.json
Normal file
18
.config/dotnet-tools.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-user-secrets": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-user-secrets"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
25
.dockerignore
Normal file
25
.dockerignore
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/.idea
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
13
.idea/.idea.PiwigoDirectorySync/.idea/.gitignore
vendored
Normal file
13
.idea/.idea.PiwigoDirectorySync/.idea/.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.PiwigoDirectorySync.iml
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
4
.idea/.idea.PiwigoDirectorySync/.idea/encodings.xml
Normal file
4
.idea/.idea.PiwigoDirectorySync/.idea/encodings.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
8
.idea/.idea.PiwigoDirectorySync/.idea/indexLayout.xml
Normal file
8
.idea/.idea.PiwigoDirectorySync/.idea/indexLayout.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/.idea.PiwigoDirectorySync/.idea/vcs.xml
Normal file
6
.idea/.idea.PiwigoDirectorySync/.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
68
Jenkinsfile
vendored
Normal file
68
Jenkinsfile
vendored
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
docker { image 'mcr.microsoft.com/dotnet/sdk:6.0'}
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
APPVERSION = "0.0.1"
|
||||||
|
HOME = "${env.WORKSPACE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('preparing workspace') {
|
||||||
|
steps {
|
||||||
|
cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.nuget/NuGet/NuGet.Config', type: 'INCLUDE']]
|
||||||
|
dir('publish') {
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'giteaNugetPushCreds', passwordVariable: 'NUGETPWD', usernameVariable: 'NUGETUSR')]) {
|
||||||
|
sh 'dotnet nuget add source --name gitea --username $NUGETUSR --password $NUGETPWD --store-password-in-clear-text https://git.haefelfinger.net/api/packages/piwigo/nuget/index.json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('nuget restore') {
|
||||||
|
steps {
|
||||||
|
sh "dotnet restore ${env.WORKSPACE}/photo.haefelfinger.workflow.sln"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('test') {
|
||||||
|
steps {
|
||||||
|
sh "dotnet test ${env.WORKSPACE}/photo.haefelfinger.workflow.sln --no-restore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('build api') {
|
||||||
|
steps {
|
||||||
|
sh "/bin/true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('api docker image') {
|
||||||
|
steps {
|
||||||
|
sh "/bin/true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('build cli') {
|
||||||
|
steps {
|
||||||
|
sh "dotnet publish ${env.WORKSPACE}/photo.haefelfinger.workflow.cli/photo.haefelfinger.workflow.cli.csproj -c Release --self-contained true -r linux-x64 -o ${env.WORKSPACE}/publish/cli-linux -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}"
|
||||||
|
sh "dotnet publish ${env.WORKSPACE}/photo.haefelfinger.workflow.cli/photo.haefelfinger.workflow.cli.csproj -c Release --self-contained true -r win-x64 -o ${env.WORKSPACE}/publish/cli-win -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('publish docker images') {
|
||||||
|
steps {
|
||||||
|
sh "/bin/true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: "publish/**/*", onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
6
NuGet.Config
Normal file
6
NuGet.Config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="piwigo.git.haefelfinger.net" value="https://git.haefelfinger.net/api/packages/piwigo/nuget/index.json" protocolVersion="3" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
16
PiwigoDirectorySync.sln
Normal file
16
PiwigoDirectorySync.sln
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PiwigoDirectorySync", "PiwigoDirectorySync\PiwigoDirectorySync.csproj", "{1381617F-F27E-4430-81FD-60EA78A6406F}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{1381617F-F27E-4430-81FD-60EA78A6406F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1381617F-F27E-4430-81FD-60EA78A6406F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1381617F-F27E-4430-81FD-60EA78A6406F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1381617F-F27E-4430-81FD-60EA78A6406F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
101
PiwigoDirectorySync.sln.DotSettings
Normal file
101
PiwigoDirectorySync.sln.DotSettings
Normal file
File diff suppressed because one or more lines are too long
18
PiwigoDirectorySync/Dockerfile
Normal file
18
PiwigoDirectorySync/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["PiwigoDirectorySync/PiwigoDirectorySync.csproj", "PiwigoDirectorySync/"]
|
||||||
|
RUN dotnet restore "PiwigoDirectorySync/PiwigoDirectorySync.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/PiwigoDirectorySync"
|
||||||
|
RUN dotnet build "PiwigoDirectorySync.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish "PiwigoDirectorySync.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "PiwigoDirectorySync.dll"]
|
17
PiwigoDirectorySync/PiwigoDirectorySync.csproj
Normal file
17
PiwigoDirectorySync/PiwigoDirectorySync.csproj
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\.dockerignore">
|
||||||
|
<Link>.dockerignore</Link>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
3
PiwigoDirectorySync/Program.cs
Normal file
3
PiwigoDirectorySync/Program.cs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
Console.WriteLine("Hello, World!");
|
Loading…
Reference in New Issue
Block a user