Skip to content

Commit c079b30

Browse files
committed
build: update onedev-buildspec
1 parent aa94dfb commit c079b30

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

.onedev-buildspec.yml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 25
1+
version: 40
22
jobs:
33
- name: CI
44
steps:
@@ -8,22 +8,25 @@ jobs:
88
withLfs: false
99
withSubmodules: false
1010
cloneDepth: 1
11-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
11+
condition: SUCCESSFUL
12+
optional: false
1213
- !CommandStep
1314
name: build
1415
runInContainer: true
1516
image: docksdev/band:8.0
1617
interpreter: !DefaultInterpreter
17-
commands:
18-
- cd src/SimpleW/
19-
- dotnet build -c @param:build_configuration@ SimpleW.csproj
18+
commands: |
19+
cd src/SimpleW/
20+
dotnet build -c @param:build_configuration@ SimpleW.csproj
2021
useTTY: false
21-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
22+
condition: SUCCESSFUL
23+
optional: false
2224
- !PublishArtifactStep
2325
name: publish artifact
2426
sourcePath: src/SimpleW/bin/@param:build_configuration@/
2527
artifacts: '*/SimpleW.dll'
26-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
28+
condition: SUCCESSFUL
29+
optional: false
2730
paramSpecs:
2831
- !ChoiceParam
2932
name: build_configuration
@@ -40,12 +43,12 @@ jobs:
4043
value: Release
4144
triggers:
4245
- !BranchUpdateTrigger
43-
params:
46+
paramMatrix:
4447
- name: build_configuration
48+
secret: false
4549
valuesProvider: !SpecifiedValues
4650
values:
4751
- - Release
48-
secret: false
4952
retryCondition: never
5053
maxRetries: 3
5154
retryDelay: 30
@@ -58,41 +61,45 @@ jobs:
5861
withLfs: false
5962
withSubmodules: false
6063
cloneDepth: 1
61-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
64+
condition: SUCCESSFUL
65+
optional: false
6266
- !CommandStep
6367
name: build
6468
runInContainer: true
6569
image: docksdev/band:8.0
6670
interpreter: !DefaultInterpreter
67-
commands:
68-
- cd src/SimpleW
69-
- dotnet pack -c Release SimpleW.csproj
71+
commands: |
72+
cd src/SimpleW
73+
dotnet pack -c Release SimpleW.csproj
7074
useTTY: false
71-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
75+
condition: SUCCESSFUL
76+
optional: false
7277
- !PublishArtifactStep
7378
name: publish artifact
7479
sourcePath: src/SimpleW/bin/Release/
7580
artifacts: '*.nupkg'
76-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
81+
condition: SUCCESSFUL
82+
optional: false
7783
- !CommandStep
7884
name: deploy to nuget.org
7985
runInContainer: true
8086
image: docksdev/band:8.0
8187
interpreter: !DefaultInterpreter
82-
commands:
83-
- cd src/SimpleW/bin/Release
84-
- dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
88+
commands: |
89+
cd src/SimpleW/bin/Release
90+
dotnet nuget push *.nupkg --api-key @secret:nuget_token@ --source https://api.nuget.org/v3/index.json
8591
useTTY: false
86-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
92+
condition: SUCCESSFUL
93+
optional: false
8794
jobDependencies:
8895
- jobName: CI
8996
requireSuccessful: true
90-
jobParams:
97+
paramMatrix:
9198
- name: build_configuration
99+
secret: false
92100
valuesProvider: !SpecifiedValues
93101
values:
94102
- - Release
95-
secret: false
96103
retryCondition: never
97104
maxRetries: 3
98105
retryDelay: 30
@@ -104,16 +111,17 @@ jobs:
104111
remoteUrl: https://github.com/stratdev3/SimpleW
105112
passwordSecret: github_token
106113
force: true
107-
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
114+
condition: SUCCESSFUL
115+
optional: false
108116
jobDependencies:
109117
- jobName: CI
110118
requireSuccessful: true
111-
jobParams:
119+
paramMatrix:
112120
- name: build_configuration
121+
secret: false
113122
valuesProvider: !SpecifiedValues
114123
values:
115124
- - Release
116-
secret: false
117125
retryCondition: never
118126
maxRetries: 3
119127
retryDelay: 30

0 commit comments

Comments
 (0)