Ver Fonte

Jenkinsfile o3de/ASV build separation (#387)

* Separate the AR and nightly builds of ASV (or any project) between the engine and ASV pipelines

Signed-off-by: Mike Chang <[email protected]>
Mike Chang há 3 anos atrás
pai
commit
1aa825b86d
1 ficheiros alterados com 28 adições e 5 exclusões
  1. 28 5
      Scripts/build/Jenkins/Jenkinsfile

+ 28 - 5
Scripts/build/Jenkins/Jenkinsfile

@@ -850,7 +850,8 @@ try {
     def someBuildHappened = false
 
     // Build and Post-Build Testing Stage
-    def buildConfigs = [:]
+    def enginebuildConfigs = [:]
+    def platformBuildConfigs =[:]
 
     // Platform Builds run on EC2
     pipelineConfig.platforms.each { platform ->
@@ -858,19 +859,41 @@ try {
             if (IsJobEnabled(branchName, build_job, pipelineName, platform.key)) {   // User can filter jobs, jobs are tagged by pipeline
                 def envVars = GetBuildEnvVars(platform.value.PIPELINE_ENV ?: EMPTY_JSON, build_job.value.PIPELINE_ENV ?: EMPTY_JSON, pipelineName)
                 envVars['JOB_NAME'] = "${branchName}_${platform.key}_${build_job.key}" // backwards compatibility, some scripts rely on this
-                envVars['CMAKE_LY_PROJECTS'] = "../${PROJECT_REPOSITORY_NAME}"
                 def nodeLabel = envVars['NODE_LABEL']
                 someBuildHappened = true
 
-                buildConfigs["${platform.key} [${build_job.key}]"] = CreateBuildJobs(pipelineConfig, platform, build_job, envVars, branchName, pipelineName, repositoryName, projectName)
+                enginebuildConfigs["${platform.key} [${build_job.key}]"] = CreateBuildJobs(pipelineConfig, platform, build_job, envVars, branchName, pipelineName, repositoryName, projectName)
+            }
+        }
+    }
+
+    // Project Platform Builds run on EC2
+    pipelineConfig.platforms.each { platform ->
+        platform.value.build_types.each { build_job ->
+            if (IsJobEnabled(branchName, build_job, pipelineName, platform.key)) {   // User can filter jobs, jobs are tagged by pipeline
+                def envVars = GetBuildEnvVars(platform.value.PIPELINE_ENV ?: EMPTY_JSON, build_job.value.PIPELINE_ENV ?: EMPTY_JSON, pipelineName)
+                envVars['JOB_NAME'] = "${branchName}_${platform.key}_${build_job.key}" // backwards compatibility, some scripts rely on this
+                def nodeLabel = envVars['NODE_LABEL']
+                someBuildHappened = true
+
+                envVars['CMAKE_LY_PROJECTS'] = "../${PROJECT_REPOSITORY_NAME}"
+                platformBuildConfigs["${platform.key} [${build_job.key}]"] = CreateBuildJobs(pipelineConfig, platform, build_job, envVars, branchName, pipelineName, repositoryName, projectName)
             }
         }
     }
 
     timestamps {
 
-        stage('Build') {
-            parallel buildConfigs // Run parallel builds
+        stage("${ENGINE_REPOSITORY_NAME} Build") {
+            catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+                parallel enginebuildConfigs // Run parallel builds
+            }
+        }
+        
+        stage("${PROJECT_REPOSITORY_NAME} Build") {
+            catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+                parallel platformBuildConfigs // Run parallel builds
+            }
         }
 
         echo 'All builds successful'