This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'prepare-release' into release
- Loading branch information
Showing
2 changed files
with
37 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,154 +1,6 @@ | ||
#!/usr/bin/env groovy | ||
|
||
final def pipelineSdkVersion = 'v32' | ||
final def pipelineSdkVersion = 'v33' | ||
|
||
pipeline { | ||
agent any | ||
options { | ||
timeout(time: 120, unit: 'MINUTES') | ||
timestamps() | ||
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) | ||
skipDefaultCheckout() | ||
} | ||
stages { | ||
stage('Init') { | ||
steps { | ||
milestone 10 | ||
library "s4sdk-pipeline-library@${pipelineSdkVersion}" | ||
stageInitS4sdkPipeline script: this | ||
abortOldBuilds script: this | ||
} | ||
} | ||
|
||
stage('Build and Test') { | ||
steps { | ||
milestone 20 | ||
stageBuild script: this | ||
} | ||
} | ||
|
||
stage('Local Tests') { | ||
parallel { | ||
stage("Static Code Checks") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.STATIC_CODE_CHECKS } } | ||
steps { piperPipelineStageMavenStaticCodeChecks script: this } | ||
} | ||
stage("Lint") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.LINT } } | ||
steps { stageLint script: this } | ||
} | ||
stage("Backend Integration Tests") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.BACKEND_INTEGRATION_TESTS } } | ||
steps { stageBackendIntegrationTests script: this } | ||
} | ||
stage("Frontend Integration Tests") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.FRONTEND_INTEGRATION_TESTS } } | ||
steps { stageFrontendIntegrationTests script: this } | ||
} | ||
stage("Frontend Unit Tests") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.FRONTEND_UNIT_TESTS } } | ||
steps { stageFrontendUnitTests script: this } | ||
} | ||
stage("NPM Dependency Audit") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.NPM_AUDIT } } | ||
steps { stageNpmAudit script: this } | ||
} | ||
} | ||
} | ||
|
||
stage('Remote Tests') { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.REMOTE_TESTS } } | ||
parallel { | ||
stage("End to End Tests") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.E2E_TESTS } } | ||
steps { stageEndToEndTests script: this } | ||
} | ||
stage("Performance Tests") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.PERFORMANCE_TESTS } } | ||
steps { stagePerformanceTests script: this } | ||
} | ||
} | ||
} | ||
|
||
stage('Quality Checks') { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.QUALITY_CHECKS } } | ||
steps { | ||
milestone 50 | ||
stageS4SdkQualityChecks script: this | ||
} | ||
} | ||
|
||
stage('Third-party Checks') { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.THIRD_PARTY_CHECKS } } | ||
parallel { | ||
stage("Checkmarx Scan") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.CHECKMARX_SCAN } } | ||
steps { stageCheckmarxScan script: this } | ||
} | ||
stage("WhiteSource Scan") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.WHITESOURCE_SCAN } } | ||
steps { stageWhitesourceScan script: this } | ||
} | ||
stage("SourceClear Scan") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.SOURCE_CLEAR_SCAN } } | ||
steps { stageSourceClearScan script: this } | ||
} | ||
stage("Fortify Scan") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.FORTIFY_SCAN } } | ||
steps { stageFortifyScan script: this } | ||
} | ||
stage("Additional Tools") { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.ADDITIONAL_TOOLS } } | ||
steps { stageAdditionalTools script: this } | ||
} | ||
stage('SonarQube Scan'){ | ||
when { expression { commonPipelineEnvironment.configuration.runStage.SONARQUBE_SCAN } } | ||
steps { stageSonarQubeScan script: this } | ||
} | ||
} | ||
} | ||
|
||
stage('Artifact Deployment') { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.ARTIFACT_DEPLOYMENT } } | ||
steps { | ||
milestone 70 | ||
piperPipelineStageArtifactDeployment script: this | ||
} | ||
} | ||
|
||
stage('Production Deployment') { | ||
when { expression { commonPipelineEnvironment.configuration.runStage.PRODUCTION_DEPLOYMENT } } | ||
//milestone 80 is set in stageProductionDeployment | ||
steps { stageProductionDeployment script: this } | ||
} | ||
|
||
} | ||
post { | ||
always { | ||
script { | ||
debugReportArchive script: this | ||
if (commonPipelineEnvironment?.configuration?.runStage?.SEND_NOTIFICATION) { | ||
postActionSendNotification script: this | ||
} | ||
postActionCleanupStashesLocks script: this | ||
sendAnalytics script: this | ||
|
||
if (commonPipelineEnvironment?.configuration?.runStage?.POST_PIPELINE_HOOK) { | ||
stage('Post Pipeline Hook') { | ||
stagePostPipelineHook script: this | ||
} | ||
} | ||
} | ||
} | ||
success { | ||
script { | ||
if (commonPipelineEnvironment?.configuration?.runStage?.ARCHIVE_REPORT) { | ||
postActionArchiveReport script: this | ||
} | ||
} | ||
} | ||
failure { | ||
deleteDir() | ||
} | ||
} | ||
} | ||
library "s4sdk-pipeline-library@${pipelineSdkVersion}" | ||
cloudSdkPipeline(script: this) |