@@ -69,13 +69,20 @@ steps:
69
69
- mvn ${{MVN_BUILD_FLAGS}} ${{MVN_CLI_OPT}} versions:set -DnewVersion=${{RELEASE_NAME}} versions:update-child-modules -DallowSnapshots=true
70
70
- mvn ${{MVN_DEPLOY_FLAGS}} ${{MVN_CLI_OPT}} clean deploy -P "${{MAVEN_BUILD_PROFILES}}"
71
71
72
- BuildParallelTasks :
72
+ FailBuildPipeline :
73
73
stage : ' build'
74
- type : parallel
74
+ title : Fail pipeline if the Maven build failed
75
+ image : codefresh/cli
75
76
when :
76
77
condition :
77
- all :
78
- buildPassed : steps.Build.result == 'success'
78
+ any :
79
+ mvnBuildFailure : steps.Build.result == 'failure'
80
+ commands :
81
+ - exit 1
82
+
83
+ BuildParallelTasks :
84
+ stage : ' build'
85
+ type : parallel
79
86
steps :
80
87
BuildDaml :
81
88
stage : ' build'
@@ -282,51 +289,13 @@ steps:
282
289
- ${{GEN_DEPLOY_POM_SCRIPT}} cdm-json-schema ${{RELEASE_NAME}} zip
283
290
- mvn org.apache.maven.plugins:maven-gpg-plugin:3.1.0:sign-and-deploy-file ${{MVN_DEPLOY_FILE_FLAGS}} -Dfile=cdm-json-schema-${{RELEASE_NAME}}.zip -DgroupId=org.finos.cdm -DartifactId=cdm-json-schema -Dversion=${{RELEASE_NAME}} -DpomFile=cdm-json-schema-${{RELEASE_NAME}}.pom
284
291
285
- NotifySlackOnFail :
292
+ FailDeployPipeline :
286
293
stage : ' finalise'
287
- title : Trigger Slack dev channel notification if master build failed
294
+ title : Fail pipeline if the Maven deploy failed
288
295
image : codefresh/cli
289
296
when :
290
- branch :
291
- only :
292
- - master
293
297
condition :
294
298
any :
295
- mvnBuildFailed : steps.Build.result == 'error'
296
- buildDamlFailed : steps.BuildDaml.result == 'error'
297
- buildScalaFailed : steps.BuildScala.result == 'error'
298
- buildCSharp8Failed : steps.BuildCSharp8.result == 'error'
299
- buildCSharp9Failed : steps.BuildCSharp9.result == 'error'
300
- buildPythonFailed : steps.BuildPython.result == 'error'
301
- deployDamlFailed : steps.DeployDaml.result == 'error'
302
- deployScalaFailed : steps.DeployScala.result == 'error'
303
- deployTypeScriptFailed : steps.DeployTypeScript.result == 'error'
304
- deployCSharp8Failed : steps.DeployCSharp8.result == 'error'
305
- deployCSharp9Failed : steps.DeployCSharp9.result == 'error'
306
- deployGoFailed : steps.DeployGo.result == 'error'
307
- deployKotlinFailed : steps.DeployKotlin.result == 'error'
308
- deployPythonFailed : steps.DeployPython.result == 'error'
309
- deployExcelFailed : steps.DeployExcel.result == 'error'
310
- deployJsonSchemaFailed : steps.DeployJsonSchema.result == 'error'
311
- commands :
312
- - export SAFE_COMMIT_AUTHOR='${{CF_COMMIT_AUTHOR}}'
313
- - export COMMIT_AUTHOR=${SAFE_COMMIT_AUTHOR:-MissingAuthor}
314
- - export SAFE_REPO_NAME='${{CF_REPO_NAME}}'
315
- - export REPO_NAME=${SAFE_REPO_NAME:-NoRepo}
316
- - export SAFE_COMMIT_MESSAGE='${{CF_COMMIT_MESSAGE}}'
317
- - export COMMIT_MESSAGE=${SAFE_COMMIT_MESSAGE:-NoCommitMsg}
318
- - echo Author is $SAFE_COMMIT_AUTHOR and commit msg is $SAFE_COMMIT_MESSAGE and repo is $SAFE_REPO_NAME
319
- - echo After substitution author is $COMMIT_AUTHOR and commit msg is $COMMIT_MESSAGE and repo is $REPO_NAME
320
- - codefresh run slack-notifier -v REPO_NAME="${REPO_NAME}" -v COMMIT_AUTHOR="${COMMIT_AUTHOR}" -v COMMIT_MESSAGE="${COMMIT_MESSAGE}" --detach
321
-
322
- FailPipeline :
323
- stage : ' finalise'
324
- title : Fail pipeline if the Maven build failed
325
- image : codefresh/cli
326
- when :
327
- condition :
328
- any :
329
- mvnBuildFailure : steps.Build.result == 'failure'
330
299
damlBuildFailure : steps.BuildDaml.result == 'failure'
331
300
scalaBuildFailure : steps.BuildScala.result == 'failure'
332
301
cSharp8BuildFailure : steps.BuildCSharp8.result == 'failure'
0 commit comments