Fixed pipeline.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
This commit is contained in:
parent
db856dcc1b
commit
419be86289
16
.devcontainer/Dockerfile
Normal file
16
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM mcr.microsoft.com/devcontainers/miniconda:1-3
|
||||
|
||||
# Copy environment.yml (if found) to a temp location so we update the environment. Also
|
||||
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
|
||||
COPY environment.yml* noop.txt /tmp/conda-tmp/
|
||||
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
|
||||
&& rm -rf /tmp/conda-tmp
|
||||
|
||||
# [Optional] Uncomment to install a different version of Python than the default
|
||||
# RUN conda install -y python=3.6 \
|
||||
# && pip install --no-cache-dir pipx \
|
||||
# && pipx reinstall-all
|
||||
|
||||
# [Optional] Uncomment this section to install additional OS packages.
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "Debian",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/base:bullseye"
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
}
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
3
.devcontainer/noop.txt
Normal file
3
.devcontainer/noop.txt
Normal file
@ -0,0 +1,3 @@
|
||||
This file is copied into the container along with environment.yml* from the
|
||||
parent folder. This is done to prevent the Dockerfile COPY instruction from
|
||||
failing if no environment.yml is found.
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dotnet.dotnetPath": "/opt/conda/lib/dotnet/",
|
||||
"omnisharp.dotNetCliPaths": [
|
||||
"/opt/conda/lib/dotnet/dotnet"
|
||||
]
|
||||
}
|
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@ -10,10 +10,10 @@ pipeline {
|
||||
stage("Install") {
|
||||
steps {
|
||||
sh 'conda update conda'
|
||||
sh 'conda env update -n base --file environment.yml -q'
|
||||
sh 'dotnet restore Props/Props.csproj'
|
||||
sh 'dotnet restore Props.Tests/Props.Tests.csproj'
|
||||
sh 'dotnet restore Props.Shop/Props.Shop.sln'
|
||||
sh 'conda env update -n base --file .devcontainer/environment.yml'
|
||||
sh 'conda run -n base dotnet restore Props/Props.csproj'
|
||||
sh 'conda run -n base dotnet restore Props.Tests/Props.Tests.csproj'
|
||||
sh 'conda run -n base dotnet restore Props.Shop/Props.Shop.sln'
|
||||
sh 'npm install --prefix ./Props'
|
||||
}
|
||||
}
|
||||
@ -21,13 +21,14 @@ pipeline {
|
||||
stages {
|
||||
stage("Test") {
|
||||
steps {
|
||||
sh 'dotnet test --logger xunit --no-restore Props.Shop/Adafruit.Tests/Props.Shop.Adafruit.Tests.csproj'
|
||||
sh 'conda run -n base dotnet test --logger xunit --no-restore Props.Shop/**/*.Tests.csproj'
|
||||
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
||||
}
|
||||
}
|
||||
stage("Publish") {
|
||||
steps {
|
||||
sh 'dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln'
|
||||
sh 'conda run -n base dotnet publish --configuration Release --output output/shop-modules Props.Shop/*.csproj'
|
||||
sh 'rm output/shop-modules/**/*.Tests.dll'
|
||||
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
||||
sh 'cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.'
|
||||
}
|
||||
@ -38,14 +39,14 @@ pipeline {
|
||||
stages {
|
||||
stage("Test") {
|
||||
steps {
|
||||
sh 'dotnet test --logger xunit --no-restore Props.Tests'
|
||||
sh 'conda run -n base dotnet test --logger xunit --no-restore Props.Tests/Props.Tests.csproj'
|
||||
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
||||
}
|
||||
}
|
||||
stage("Publish") {
|
||||
steps {
|
||||
sh 'dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props'
|
||||
sh 'dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props'
|
||||
sh 'conda run -n base dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props'
|
||||
sh 'conda run -n base dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props'
|
||||
fingerprint 'output/props/**/Props*'
|
||||
tar file: "output/props-linux-x64.tar.gz", archive: true, compress: true, dir: "output/props/props-linux-x64"
|
||||
zip zipFile: "output/props-win-x64.zip", archive: true, dir: "output/props/props-win-x64"
|
||||
|
@ -1,30 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30114.105
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit", "Adafruit\Props.Shop.Adafruit.csproj", "{9C8E4646-C49E-422E-9884-A49D4A05998C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Framework", "Framework\Props.Shop.Framework.csproj", "{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit.Tests", "Adafruit.Tests\Props.Shop.Adafruit.Tests.csproj", "{DDE31868-2F4E-43D1-9955-E1B4C1BB13A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9C8E4646-C49E-422E-9884-A49D4A05998C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2ED74B8A-F8A7-4DA0-B8E9-AE97207AB20A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
53
props.sln
Normal file
53
props.sln
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Tests", "Props.Tests\Props.Tests.csproj", "{FB728827-A47B-42C1-8DB4-8AD95566E827}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props", "Props\Props.csproj", "{97CDC447-2FB7-448C-86E9-301BE1F04BE7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props.Shop", "Props.Shop", "{0A2915DE-91DD-44AC-855D-059D45CEA9FE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit.Tests", "Props.Shop\Adafruit.Tests\Props.Shop.Adafruit.Tests.csproj", "{334B69F3-3707-4D45-97D8-13D37B19ABEC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Adafruit", "Props.Shop\Adafruit\Props.Shop.Adafruit.csproj", "{528D0B67-B4D0-4B56-8375-D004E192E712}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Props.Shop.Framework", "Props.Shop\Framework\Props.Shop.Framework.csproj", "{6D976097-07DB-476C-80D4-EA24A407D3E3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FB728827-A47B-42C1-8DB4-8AD95566E827}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{97CDC447-2FB7-448C-86E9-301BE1F04BE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{334B69F3-3707-4D45-97D8-13D37B19ABEC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{528D0B67-B4D0-4B56-8375-D004E192E712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{528D0B67-B4D0-4B56-8375-D004E192E712}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{528D0B67-B4D0-4B56-8375-D004E192E712}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{528D0B67-B4D0-4B56-8375-D004E192E712}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D976097-07DB-476C-80D4-EA24A407D3E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{334B69F3-3707-4D45-97D8-13D37B19ABEC} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
|
||||
{528D0B67-B4D0-4B56-8375-D004E192E712} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
|
||||
{6D976097-07DB-476C-80D4-EA24A407D3E3} = {0A2915DE-91DD-44AC-855D-059D45CEA9FE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Reference in New Issue
Block a user