Skip to content

Commit ffd8347

Browse files
authored
Fail pipeline for missing version when deploying to Q, P environments (#1248)
Fail the pipeline when no version specified for a Deploy to Q, P environments.
1 parent c373732 commit ffd8347

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Changed
88

99
### Fixed
10+
* Fail the pipeline when no version specified for a deploy to Q, P ([#1248](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1248))
1011
* Fix Tailor deployment drifts for D, Q envs ([#1055](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1055))
1112

1213
## [4.11.0] - 2025-12-03

vars/odsOrchestrationPipeline.groovy

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def call(Map config) {
5454
def repos = []
5555

5656
logger.startClocked('orchestration-master-node')
57-
5857
node('master') {
5958
try {
6059
logger.debugClocked('orchestration-master-node')
@@ -99,28 +98,29 @@ def call(Map config) {
9998
} catch (Exception e) {
10099
logger.error("Exception catched in the pipeline execution: ${e.message}")
101100
uploadResourcesToNexus(steps, project, logger)
102-
}
103-
}
104-
105-
logger.resetStopwatch()
106-
project.clear()
107-
ServiceRegistry.removeInstance()
108-
UnirestConfig.shutdown()
109-
project = null
110-
git = null
111-
repos = null
112-
steps = null
101+
throw e
102+
} finally {
103+
try {
104+
logger.resetStopwatch()
105+
project.clear()
106+
ServiceRegistry.removeInstance()
107+
UnirestConfig.shutdown()
108+
project = null
109+
git = null
110+
repos = null
111+
steps = null
113112

114-
try {
115-
new ClassLoaderCleaner().clean(logger, processId)
116-
// use the jenkins INTERNAL cleanupHeap method - attention NOTHING can happen after this method!
117-
logger.debug("forceClean via jenkins internals....")
118-
// Force cleanup of the heap to release memory
119-
Method cleanupHeap = currentBuild.getRawBuild().getExecution().class.getDeclaredMethod("cleanUpHeap")
120-
cleanupHeap.setAccessible(true)
121-
cleanupHeap.invoke(currentBuild.getRawBuild().getExecution(), null)
122-
} catch (Exception e) {
123-
logger.debug("cleanupHeap err: ${e}")
113+
new ClassLoaderCleaner().clean(logger, processId)
114+
// use the jenkins INTERNAL cleanupHeap method - attention NOTHING can happen after this method!
115+
logger.debug("forceClean via jenkins internals....")
116+
// Force cleanup of the heap to release memory
117+
Method cleanupHeap = currentBuild.getRawBuild().getExecution().class.getDeclaredMethod("cleanUpHeap")
118+
cleanupHeap.setAccessible(true)
119+
cleanupHeap.invoke(currentBuild.getRawBuild().getExecution(), null)
120+
} catch (Exception e) {
121+
logger.debug("cleanupHeap err: ${e}")
122+
}
123+
}
124124
}
125125
}
126126

@@ -284,4 +284,4 @@ private NexusService getNexusService(def registry) {
284284
return nexusService
285285
}
286286

287-
return this
287+
return this

0 commit comments

Comments
 (0)