Skip to content

Commit d6d8b2b

Browse files
committed
update buildspec
1 parent d83dd67 commit d6d8b2b

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

.onedev-buildspec.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ jobs:
8383
useTTY: false
8484
condition: SUCCESSFUL
8585
optional: false
86+
- type: CommandStep
87+
name: build SimpleW.Helper.OpenID
88+
runInContainer: true
89+
image: mcr.microsoft.com/dotnet/sdk:10.0
90+
interpreter:
91+
type: DefaultInterpreter
92+
commands: |
93+
cd src/SimpleW.Helper.OpenID/
94+
dotnet build -c @param:build_configuration@ SimpleW.Helper.OpenID.csproj
95+
useTTY: false
96+
condition: SUCCESSFUL
97+
optional: false
8698
- type: CommandStep
8799
name: build SimpleW.Helper.Razor
88100
runInContainer: true
@@ -245,6 +257,12 @@ jobs:
245257
artifacts: '*/SimpleW.Helper.Log4net.dll'
246258
condition: SUCCESSFUL
247259
optional: false
260+
- type: PublishArtifactStep
261+
name: publish artifact SimpleW.Helper.OpenID
262+
sourcePath: src/SimpleW.Helper.OpenID/bin/@param:build_configuration@/
263+
artifacts: '*/SimpleW.Helper.OpenID.dll'
264+
condition: SUCCESSFUL
265+
optional: false
248266
- type: PublishArtifactStep
249267
name: publish artifact SimpleW.Helper.Razor
250268
sourcePath: src/SimpleW.Helper.Razor/bin/@param:build_configuration@/
@@ -417,6 +435,20 @@ jobs:
417435
useTTY: false
418436
condition: SUCCESSFUL
419437
optional: false
438+
- type: CommandStep
439+
name: pack SimpleW.Helper.OpenID
440+
runInContainer: true
441+
image: mcr.microsoft.com/dotnet/sdk:10.0
442+
interpreter:
443+
type: DefaultInterpreter
444+
commands: |
445+
cd src/SimpleW.Helper.OpenID
446+
TS=$(date +"%Y%m%d")-@build_number@
447+
sed -i -E "s#<Version>([0-9]+\.[0-9]+\.[0-9]+)[^<]*</Version>#<Version>\\1-@param:testing@.${TS}</Version>#g" SimpleW.Helper.OpenID.csproj
448+
dotnet pack -c Release SimpleW.Helper.OpenID.csproj
449+
useTTY: false
450+
condition: SUCCESSFUL
451+
optional: false
420452
- type: CommandStep
421453
name: pack SimpleW.Helper.Swagger
422454
runInContainer: true
@@ -604,6 +636,12 @@ jobs:
604636
artifacts: '*.*nupkg'
605637
condition: SUCCESSFUL
606638
optional: false
639+
- type: PublishArtifactStep
640+
name: publish artifact SimpleW.Helper.OpenID
641+
sourcePath: src/SimpleW.Helper.OpenID/bin/Release/
642+
artifacts: '*.*nupkg'
643+
condition: SUCCESSFUL
644+
optional: false
607645
- type: PublishArtifactStep
608646
name: publish artifact SimpleW.Helper.Razor
609647
sourcePath: src/SimpleW.Helper.Razor/bin/Release/
@@ -730,6 +768,18 @@ jobs:
730768
useTTY: false
731769
condition: SUCCESSFUL
732770
optional: false
771+
- type: CommandStep
772+
name: deploy SimpleW.Helper.OpenID to nuget.org
773+
runInContainer: true
774+
image: docksdev/band:8.0
775+
interpreter:
776+
type: DefaultInterpreter
777+
commands: |
778+
cd src/SimpleW.Helper.OpenID/bin/Release
779+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
780+
useTTY: false
781+
condition: SUCCESSFUL
782+
optional: false
733783
- type: CommandStep
734784
name: deploy SimpleW.Helper.Razor to nuget.org
735785
runInContainer: true
@@ -1168,6 +1218,61 @@ jobs:
11681218
maxRetries: 3
11691219
retryDelay: 30
11701220
timeout: 3600
1221+
- name: CD production nuget SimpleW.Helper.OpenID
1222+
steps:
1223+
- type: CheckoutStep
1224+
name: checkout code
1225+
cloneCredential:
1226+
type: DefaultCredential
1227+
withLfs: false
1228+
withSubmodules: false
1229+
cloneDepth: 1
1230+
condition: SUCCESSFUL
1231+
optional: false
1232+
- type: CommandStep
1233+
name: pack SimpleW.Helper.OpenID
1234+
runInContainer: true
1235+
image: mcr.microsoft.com/dotnet/sdk:10.0
1236+
interpreter:
1237+
type: DefaultInterpreter
1238+
commands: |
1239+
cd src/SimpleW.Helper.OpenID
1240+
dotnet pack -c Release -p:UseLocalSimpleW=false SimpleW.Helper.OpenID.csproj
1241+
useTTY: false
1242+
condition: SUCCESSFUL
1243+
optional: false
1244+
- type: PublishArtifactStep
1245+
name: publish artifact SimpleW.Helper.OpenID
1246+
sourcePath: src/SimpleW.Helper.OpenID/bin/Release/
1247+
artifacts: '*.*nupkg'
1248+
condition: SUCCESSFUL
1249+
optional: false
1250+
- type: CommandStep
1251+
name: deploy SimpleW.Helper.OpenID to nuget.org
1252+
runInContainer: true
1253+
image: docksdev/band:8.0
1254+
interpreter:
1255+
type: DefaultInterpreter
1256+
commands: |
1257+
cd src/SimpleW.Helper.OpenID/bin/Release
1258+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
1259+
useTTY: false
1260+
condition: SUCCESSFUL
1261+
optional: false
1262+
jobDependencies:
1263+
- jobName: CI
1264+
requireSuccessful: true
1265+
paramMatrix:
1266+
- valuesProvider:
1267+
type: SpecifiedValues
1268+
values:
1269+
- - Release
1270+
secret: false
1271+
name: build_configuration
1272+
retryCondition: never
1273+
maxRetries: 3
1274+
retryDelay: 30
1275+
timeout: 3600
11711276
- name: CD production nuget SimpleW.Helper.Razor
11721277
steps:
11731278
- type: CheckoutStep

0 commit comments

Comments
 (0)