Skip to content

Commit bc7d930

Browse files
committed
feature(REWRITE): add new package SimpleW.Helper.BasicAuth and SimpleW.Service.BasicAuth (#365)
1 parent 83df04f commit bc7d930

10 files changed

Lines changed: 1123 additions & 463 deletions

File tree

.onedev-buildspec.yml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ jobs:
3535
useTTY: false
3636
condition: SUCCESSFUL
3737
optional: false
38+
- type: CommandStep
39+
name: build SimpleW.Helper.BasicAuth
40+
runInContainer: true
41+
image: mcr.microsoft.com/dotnet/sdk:10.0
42+
interpreter:
43+
type: DefaultInterpreter
44+
commands: |
45+
cd src/SimpleW.Helper.BasicAuth/
46+
dotnet build -c @param:build_configuration@ SimpleW.Helper.BasicAuth.csproj
47+
useTTY: false
48+
condition: SUCCESSFUL
49+
optional: false
3850
- type: CommandStep
3951
name: build SimpleW.Helper.Hosting
4052
runInContainer: true
@@ -119,6 +131,18 @@ jobs:
119131
useTTY: false
120132
condition: SUCCESSFUL
121133
optional: false
134+
- type: CommandStep
135+
name: build SimpleW.Service.BasicAuth
136+
runInContainer: true
137+
image: mcr.microsoft.com/dotnet/sdk:10.0
138+
interpreter:
139+
type: DefaultInterpreter
140+
commands: |
141+
cd src/SimpleW.Service.BasicAuth/
142+
dotnet build -c @param:build_configuration@ SimpleW.Service.BasicAuth.csproj
143+
useTTY: false
144+
condition: SUCCESSFUL
145+
optional: false
122146
- type: CommandStep
123147
name: build SimpleW.Service.Chaos
124148
runInContainer: true
@@ -197,6 +221,12 @@ jobs:
197221
artifacts: '*/SimpleW.dll'
198222
condition: SUCCESSFUL
199223
optional: false
224+
- type: PublishArtifactStep
225+
name: publish artifact SimpleW.Helper.BasicAuth
226+
sourcePath: src/SimpleW.Helper.BasicAuth/bin/@param:build_configuration@/
227+
artifacts: '*/SimpleW.Helper.BasicAuth.dll'
228+
condition: SUCCESSFUL
229+
optional: false
200230
- type: PublishArtifactStep
201231
name: publish artifact SimpleW.Helper.Hosting
202232
sourcePath: src/SimpleW.Helper.Hosting/bin/@param:build_configuration@/
@@ -239,6 +269,12 @@ jobs:
239269
artifacts: '*/SimpleW.JsonEngine.Newtonsoft.dll'
240270
condition: SUCCESSFUL
241271
optional: false
272+
- type: PublishArtifactStep
273+
name: publish artifact SimpleW.Service.BasicAuth
274+
sourcePath: src/SimpleW.Service.BasicAuth/bin/@param:build_configuration@/
275+
artifacts: '*/SimpleW.Service.BasicAuth.dll'
276+
condition: SUCCESSFUL
277+
optional: false
242278
- type: PublishArtifactStep
243279
name: publish artifact SimpleW.Service.Chaos
244280
sourcePath: src/SimpleW.Service.Chaos/bin/@param:build_configuration@/
@@ -325,6 +361,20 @@ jobs:
325361
useTTY: false
326362
condition: SUCCESSFUL
327363
optional: false
364+
- type: CommandStep
365+
name: pack SimpleW.Helper.BasicAuth
366+
runInContainer: true
367+
image: mcr.microsoft.com/dotnet/sdk:10.0
368+
interpreter:
369+
type: DefaultInterpreter
370+
commands: |
371+
cd src/SimpleW.Helper.BasicAuth
372+
TS=$(date +"%Y%m%d")-@build_number@
373+
sed -i -E "s#<Version>([0-9]+\.[0-9]+\.[0-9]+)[^<]*</Version>#<Version>\\1-@param:testing@.${TS}</Version>#g" SimpleW.Helper.BasicAuth.csproj
374+
dotnet pack -c Release SimpleW.Helper.BasicAuth.csproj
375+
useTTY: false
376+
condition: SUCCESSFUL
377+
optional: false
328378
- type: CommandStep
329379
name: pack SimpleW.Helper.Hosting
330380
runInContainer: true
@@ -423,6 +473,20 @@ jobs:
423473
useTTY: false
424474
condition: SUCCESSFUL
425475
optional: false
476+
- type: CommandStep
477+
name: pack SimpleW.Service.BasicAuth
478+
runInContainer: true
479+
image: mcr.microsoft.com/dotnet/sdk:10.0
480+
interpreter:
481+
type: DefaultInterpreter
482+
commands: |
483+
cd src/SimpleW.Service.BasicAuth
484+
TS=$(date +"%Y%m%d")-@build_number@
485+
sed -i -E "s#<Version>([0-9]+\.[0-9]+\.[0-9]+)[^<]*</Version>#<Version>\\1-@param:testing@.${TS}</Version>#g" SimpleW.Service.BasicAuth.csproj
486+
dotnet pack -c Release SimpleW.Service.BasicAuth.csproj
487+
useTTY: false
488+
condition: SUCCESSFUL
489+
optional: false
426490
- type: CommandStep
427491
name: pack SimpleW.Service.Chaos
428492
runInContainer: true
@@ -516,6 +580,12 @@ jobs:
516580
artifacts: '*.*nupkg'
517581
condition: SUCCESSFUL
518582
optional: false
583+
- type: PublishArtifactStep
584+
name: publish artifact SimpleW.Helper.BasicAuth
585+
sourcePath: src/SimpleW.Helper.BasicAuth/bin/Release/
586+
artifacts: '*.*nupkg'
587+
condition: SUCCESSFUL
588+
optional: false
519589
- type: PublishArtifactStep
520590
name: publish artifact SimpleW.Helper.Hosting
521591
sourcePath: src/SimpleW.Helper.Hosting/bin/Release/
@@ -558,6 +628,12 @@ jobs:
558628
artifacts: '*.*nupkg'
559629
condition: SUCCESSFUL
560630
optional: false
631+
- type: PublishArtifactStep
632+
name: publish artifact SimpleW.Service.BasicAuth
633+
sourcePath: src/SimpleW.Service.BasicAuth/bin/Release/
634+
artifacts: '*.*nupkg'
635+
condition: SUCCESSFUL
636+
optional: false
561637
- type: PublishArtifactStep
562638
name: publish artifact SimpleW.Service.Chaos
563639
sourcePath: src/SimpleW.Service.Chaos/bin/Release/
@@ -606,6 +682,18 @@ jobs:
606682
useTTY: false
607683
condition: SUCCESSFUL
608684
optional: false
685+
- type: CommandStep
686+
name: deploy SimpleW.Helper.BasicAuth to nuget.org
687+
runInContainer: true
688+
image: docksdev/band:8.0
689+
interpreter:
690+
type: DefaultInterpreter
691+
commands: |
692+
cd src/SimpleW.Helper.BasicAuth/bin/Release
693+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
694+
useTTY: false
695+
condition: SUCCESSFUL
696+
optional: false
609697
- type: CommandStep
610698
name: deploy SimpleW.Helper.Hosting to nuget.org
611699
runInContainer: true
@@ -690,6 +778,18 @@ jobs:
690778
useTTY: false
691779
condition: SUCCESSFUL
692780
optional: false
781+
- type: CommandStep
782+
name: deploy SimpleW.Service.BasicAuth to nuget.org
783+
runInContainer: true
784+
image: docksdev/band:8.0
785+
interpreter:
786+
type: DefaultInterpreter
787+
commands: |
788+
cd src/SimpleW.Service.BasicAuth/bin/Release
789+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
790+
useTTY: false
791+
condition: SUCCESSFUL
792+
optional: false
693793
- type: CommandStep
694794
name: deploy SimpleW.Service.Chaos to nuget.org
695795
runInContainer: true
@@ -848,6 +948,61 @@ jobs:
848948
maxRetries: 3
849949
retryDelay: 30
850950
timeout: 3600
951+
- name: CD production nuget SimpleW.Helper.BasicAuth
952+
steps:
953+
- type: CheckoutStep
954+
name: checkout code
955+
cloneCredential:
956+
type: DefaultCredential
957+
withLfs: false
958+
withSubmodules: false
959+
cloneDepth: 1
960+
condition: SUCCESSFUL
961+
optional: false
962+
- type: CommandStep
963+
name: pack SimpleW.Helper.BasicAuth
964+
runInContainer: true
965+
image: mcr.microsoft.com/dotnet/sdk:10.0
966+
interpreter:
967+
type: DefaultInterpreter
968+
commands: |
969+
cd src/SimpleW.Helper.BasicAuth
970+
dotnet pack -c Release -p:UseLocalSimpleW=false SimpleW.Helper.BasicAuth.csproj
971+
useTTY: false
972+
condition: SUCCESSFUL
973+
optional: false
974+
- type: PublishArtifactStep
975+
name: publish artifact SimpleW.Helper.BasicAuth
976+
sourcePath: src/SimpleW.Helper.BasicAuth/bin/Release/
977+
artifacts: '*.*nupkg'
978+
condition: SUCCESSFUL
979+
optional: false
980+
- type: CommandStep
981+
name: deploy SimpleW.Helper.BasicAuth to nuget.org
982+
runInContainer: true
983+
image: docksdev/band:8.0
984+
interpreter:
985+
type: DefaultInterpreter
986+
commands: |
987+
cd src/SimpleW.Helper.BasicAuth/bin/Release
988+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
989+
useTTY: false
990+
condition: SUCCESSFUL
991+
optional: false
992+
jobDependencies:
993+
- jobName: CI
994+
requireSuccessful: true
995+
paramMatrix:
996+
- valuesProvider:
997+
type: SpecifiedValues
998+
values:
999+
- - Release
1000+
secret: false
1001+
name: build_configuration
1002+
retryCondition: never
1003+
maxRetries: 3
1004+
retryDelay: 30
1005+
timeout: 3600
8511006
- name: CD production nuget SimpleW.Helper.Hosting
8521007
steps:
8531008
- type: CheckoutStep
@@ -1233,6 +1388,61 @@ jobs:
12331388
maxRetries: 3
12341389
retryDelay: 30
12351390
timeout: 3600
1391+
- name: CD production nuget SimpleW.Service.BasicAuth
1392+
steps:
1393+
- type: CheckoutStep
1394+
name: checkout code
1395+
cloneCredential:
1396+
type: DefaultCredential
1397+
withLfs: false
1398+
withSubmodules: false
1399+
cloneDepth: 1
1400+
condition: SUCCESSFUL
1401+
optional: false
1402+
- type: CommandStep
1403+
name: pack SimpleW.Service.BasicAuth
1404+
runInContainer: true
1405+
image: mcr.microsoft.com/dotnet/sdk:10.0
1406+
interpreter:
1407+
type: DefaultInterpreter
1408+
commands: |
1409+
cd src/SimpleW.Service.BasicAuth
1410+
dotnet pack -c Release -p:UseLocalSimpleW=false SimpleW.Service.BasicAuth.csproj
1411+
useTTY: false
1412+
condition: SUCCESSFUL
1413+
optional: false
1414+
- type: PublishArtifactStep
1415+
name: publish artifact SimpleW.Service.BasicAuth
1416+
sourcePath: src/SimpleW.Service.BasicAuth/bin/Release/
1417+
artifacts: '*.*nupkg'
1418+
condition: SUCCESSFUL
1419+
optional: false
1420+
- type: CommandStep
1421+
name: deploy SimpleW.Service.BasicAuth to nuget.org
1422+
runInContainer: true
1423+
image: docksdev/band:8.0
1424+
interpreter:
1425+
type: DefaultInterpreter
1426+
commands: |
1427+
cd src/SimpleW.Service.BasicAuth/bin/Release
1428+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
1429+
useTTY: false
1430+
condition: SUCCESSFUL
1431+
optional: false
1432+
jobDependencies:
1433+
- jobName: CI
1434+
requireSuccessful: true
1435+
paramMatrix:
1436+
- valuesProvider:
1437+
type: SpecifiedValues
1438+
values:
1439+
- - Release
1440+
secret: false
1441+
name: build_configuration
1442+
retryCondition: never
1443+
maxRetries: 3
1444+
retryDelay: 30
1445+
timeout: 3600
12361446
- name: CD production nuget SimpleW.Service.Chaos
12371447
steps:
12381448
- type: CheckoutStep

0 commit comments

Comments
 (0)