This commit is contained in:
kamonwan taengsuk
2023-08-02 14:31:28 +07:00
parent 56430a5db4
commit 54a10be954
17 changed files with 71 additions and 39 deletions

View File

@@ -1,11 +1,11 @@
FROM registry.71dev.com/dotnetsdk:3.1 as build-env FROM mcr.microsoft.com/dotnet/sdk:5.0 as build-env
WORKDIR /source WORKDIR /source
COPY . . COPY . .
RUN dotnet restore --configfile nuget.config RUN dotnet restore --configfile nuget.config
RUN dotnet build RUN dotnet build
RUN dotnet publish -o /publish --configuration Release; RUN dotnet publish -o /publish --configuration Release;
FROM registry.71dev.com/dotnetsdk:3.1 FROM mcr.microsoft.com/dotnet/sdk:5.0
COPY . . COPY . .
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends apt-utils RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y fontconfig RUN DEBIAN_FRONTEND=noninteractive apt-get install -y fontconfig
@@ -20,4 +20,4 @@ RUN fc-cache -fv
WORKDIR /app WORKDIR /app
COPY --from=build-env /publish . COPY --from=build-env /publish .
ENV ASPNETCORE_URLS http://*:8080 ENV ASPNETCORE_URLS http://*:8080
ENTRYPOINT ["dotnet", "rmutr_report.dll"] ENTRYPOINT ["dotnet", "rmutr_report.dll"]

View File

@@ -1,22 +1,16 @@
# This is a sample build configuration for .NET Core.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassian/default-image:2 image: atlassian/default-image:2
options:
docker: true
pipelines: pipelines:
default: default:
- step: - step:
size: 2x
services:
- docker
runs-on: runs-on:
- self.hosted - self.hosted
- linux - linux
caches: caches:
- dotnetcore - dotnetcore
script: # Modify the commands below to build your repository. script:
# - dotnet restore
# - dotnet build
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
- docker build -f Dockerfile.dev -t registry.71dev.com/rmutr_report:latest . - docker build -f Dockerfile.dev -t registry.71dev.com/rmutr_report:latest .
- docker push registry.71dev.com/rmutr_report:latest - docker push registry.71dev.com/rmutr_report:latest
@@ -24,8 +18,12 @@ pipelines:
runs-on: runs-on:
- self.hosted - self.hosted
- linux - linux
name: deploy to kubernates name: Deploy
image: atlassian/pipelines-kubectl image: atlassian/pipelines-kubectl
script: script:
- echo $KUBE_CONFIG | base64 -d > kubeconfig - echo $KUBE_CONFIG | base64 -d > kubeconfig
- kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig --namespace=rmutr rollout restart deployment/rmutr-report - kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig rollout restart deployment/rmutr_report
definitions:
services:
docker:
memory: 7128

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
b48f1bd72c29690b00599a37fe20d70100e422f1

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = rmutr_report
build_property.ProjectDir = C:\Users\USER\Documents\rmutr_report\

Binary file not shown.

View File

@@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"targets": { "targets": {
".NETCoreApp,Version=v3.1": { "net5.0": {
"ClosedXML/0.96.0": { "ClosedXML/0.96.0": {
"type": "package", "type": "package",
"dependencies": { "dependencies": {
@@ -446,12 +446,12 @@
"Swashbuckle.AspNetCore.SwaggerGen": "6.5.0" "Swashbuckle.AspNetCore.SwaggerGen": "6.5.0"
}, },
"compile": { "compile": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Annotations.dll": { "lib/net5.0/Swashbuckle.AspNetCore.Annotations.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
"runtime": { "runtime": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Annotations.dll": { "lib/net5.0/Swashbuckle.AspNetCore.Annotations.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
} }
@@ -462,12 +462,12 @@
"Microsoft.OpenApi": "1.2.3" "Microsoft.OpenApi": "1.2.3"
}, },
"compile": { "compile": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": { "lib/net5.0/Swashbuckle.AspNetCore.Swagger.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
"runtime": { "runtime": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.Swagger.dll": { "lib/net5.0/Swashbuckle.AspNetCore.Swagger.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
@@ -481,12 +481,12 @@
"Swashbuckle.AspNetCore.Swagger": "6.5.0" "Swashbuckle.AspNetCore.Swagger": "6.5.0"
}, },
"compile": { "compile": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": { "lib/net5.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
"runtime": { "runtime": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerGen.dll": { "lib/net5.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
} }
@@ -494,12 +494,12 @@
"Swashbuckle.AspNetCore.SwaggerUI/6.5.0": { "Swashbuckle.AspNetCore.SwaggerUI/6.5.0": {
"type": "package", "type": "package",
"compile": { "compile": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": { "lib/net5.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
"runtime": { "runtime": {
"lib/netcoreapp3.0/Swashbuckle.AspNetCore.SwaggerUI.dll": { "lib/net5.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"related": ".pdb;.xml" "related": ".pdb;.xml"
} }
}, },
@@ -2136,7 +2136,7 @@
} }
}, },
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": [ "net5.0": [
"ClosedXML >= 0.96.0", "ClosedXML >= 0.96.0",
"FastReport.Core >= 2021.3.0", "FastReport.Core >= 2021.3.0",
"Swashbuckle.AspNetCore >= 6.5.0", "Swashbuckle.AspNetCore >= 6.5.0",
@@ -2161,15 +2161,15 @@
"C:\\Program Files (x86)\\NuGet\\Config\\nuget.config" "C:\\Program Files (x86)\\NuGet\\Config\\nuget.config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"netcoreapp3.1" "net5.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "https://api.nuget.org/v3/index.json": {},
"https://nuget.71dev.com/v3/index.json": {} "https://nuget.71dev.com/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "net5.0": {
"targetAlias": "netcoreapp3.1", "targetAlias": "net5.0",
"projectReferences": {} "projectReferences": {}
} }
}, },
@@ -2180,8 +2180,8 @@
} }
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "net5.0": {
"targetAlias": "netcoreapp3.1", "targetAlias": "net5.0",
"dependencies": { "dependencies": {
"ClosedXML": { "ClosedXML": {
"target": "Package", "target": "Package",

View File

@@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "AcjdXi5x9A0nxsTWB+2PnbaIBtEgf/xXjiH70whPTOKfE3hLR7xlfQsZ/JREuaGE/sSzaWLOjWThFS4rkZ0mog==", "dgSpecHash": "TgdSlhcNLrmoGcymKBKtBNUewM9z9QdY0FESfevGdFzEBUl5TotP+ysyCZqFpczcvGDJdBKPRCtfqngiN8LZRQ==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj", "projectFilePath": "C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [

View File

@@ -1 +1 @@
"restore":{"projectUniqueName":"C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj","projectName":"rmutr_report","projectPath":"C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj","outputPath":"C:\\Users\\USER\\Documents\\rmutr_report\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["netcoreapp3.1"],"sources":{"https://api.nuget.org/v3/index.json":{},"https://nuget.71dev.com/v3/index.json":{}},"frameworks":{"netcoreapp3.1":{"projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"netcoreapp3.1":{"dependencies":{"ClosedXML":{"target":"Package","version":"[0.96.0, )"},"FastReport.Core":{"target":"Package","version":"[2021.3.0, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.5.0, )"},"Swashbuckle.AspNetCore.Annotations":{"target":"Package","version":"[6.5.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\6.0.407\\RuntimeIdentifierGraph.json"}} "restore":{"projectUniqueName":"C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj","projectName":"rmutr_report","projectPath":"C:\\Users\\USER\\Documents\\rmutr_report\\rmutr_report.csproj","outputPath":"C:\\Users\\USER\\Documents\\rmutr_report\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net5.0"],"sources":{"https://api.nuget.org/v3/index.json":{},"https://nuget.71dev.com/v3/index.json":{}},"frameworks":{"net5.0":{"projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net5.0":{"dependencies":{"ClosedXML":{"target":"Package","version":"[0.96.0, )"},"FastReport.Core":{"target":"Package","version":"[2021.3.0, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.5.0, )"},"Swashbuckle.AspNetCore.Annotations":{"target":"Package","version":"[6.5.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\6.0.407\\RuntimeIdentifierGraph.json"}}

View File

@@ -1 +1 @@
16886414723877886 16909613048948705

View File

@@ -19,15 +19,15 @@
"C:\\Program Files (x86)\\NuGet\\Config\\nuget.config" "C:\\Program Files (x86)\\NuGet\\Config\\nuget.config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"netcoreapp3.1" "net5.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "https://api.nuget.org/v3/index.json": {},
"https://nuget.71dev.com/v3/index.json": {} "https://nuget.71dev.com/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "net5.0": {
"targetAlias": "netcoreapp3.1", "targetAlias": "net5.0",
"projectReferences": {} "projectReferences": {}
} }
}, },
@@ -38,8 +38,8 @@
} }
}, },
"frameworks": { "frameworks": {
"netcoreapp3.1": { "net5.0": {
"targetAlias": "netcoreapp3.1", "targetAlias": "net5.0",
"dependencies": { "dependencies": {
"ClosedXML": { "ClosedXML": {
"target": "Package", "target": "Package",

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>