|
|
|
|
@ -16,7 +16,7 @@ INCREMENTAL_BUILD_SCRIPT_PATH = 'scripts/build/bootstrap/incremental_build_util.
|
|
|
|
|
|
|
|
|
|
EMPTY_JSON = readJSON text: '{}'
|
|
|
|
|
|
|
|
|
|
ENGINE_REPOSITORY_NAME = 'o3de'
|
|
|
|
|
ENGINE_REPOSITORY_NAME = env.DEFAULT_REPOSITORY_NAME
|
|
|
|
|
|
|
|
|
|
def pipelineProperties = []
|
|
|
|
|
|
|
|
|
|
@ -325,7 +325,6 @@ def CheckoutBootstrapScripts(String branchName) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
dir(ENGINE_REPOSITORY_NAME) {
|
|
|
|
|
palSh('git lfs uninstall', 'Git LFS Uninstall') // Prevent git from pulling lfs objects during checkout
|
|
|
|
|
|
|
|
|
|
if(fileExists('.git')) {
|
|
|
|
|
@ -339,7 +338,6 @@ def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
palRm(indexLockFile)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def random = new Random()
|
|
|
|
|
def retryAttempt = 0
|
|
|
|
|
@ -350,7 +348,6 @@ def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
retryAttempt = retryAttempt + 1
|
|
|
|
|
if(params.PULL_REQUEST_ID) {
|
|
|
|
|
// This is a pull request build. Perform merge with destination branch before building.
|
|
|
|
|
dir(ENGINE_REPOSITORY_NAME) {
|
|
|
|
|
checkout scm: [
|
|
|
|
|
$class: 'GitSCM',
|
|
|
|
|
branches: scm.branches,
|
|
|
|
|
@ -361,9 +358,7 @@ def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
],
|
|
|
|
|
userRemoteConfigs: scm.userRemoteConfigs
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
dir(ENGINE_REPOSITORY_NAME) {
|
|
|
|
|
checkout scm: [
|
|
|
|
|
$class: 'GitSCM',
|
|
|
|
|
branches: scm.branches,
|
|
|
|
|
@ -375,14 +370,7 @@ def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add folder where we will store the 3rdParty downloads and packages
|
|
|
|
|
if(!fileExists('3rdParty')) {
|
|
|
|
|
palMkdir('3rdParty')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dir(ENGINE_REPOSITORY_NAME) {
|
|
|
|
|
// Run lfs in a separate step. Jenkins is unable to load the credentials for the custom LFS endpoint
|
|
|
|
|
withCredentials([usernamePassword(credentialsId: "${env.GITHUB_USER}", passwordVariable: 'accesstoken', usernameVariable: 'username')]) {
|
|
|
|
|
SetLfsCredentials("git config -f .lfsconfig lfs.url https://${username}:${accesstoken}@${env.LFS_URL}", 'Set credentials')
|
|
|
|
|
@ -395,7 +383,6 @@ def CheckoutRepo(boolean disableSubmodules = false) {
|
|
|
|
|
env.CHANGE_ID = readFile file: 'commitid'
|
|
|
|
|
env.CHANGE_ID = env.CHANGE_ID.trim()
|
|
|
|
|
palRm('commitid')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def PreBuildCommonSteps(Map pipelineConfig, String projectName, String pipeline, String branchName, String platform, String buildType, String workspace, boolean mount = true, boolean disableSubmodules = false) {
|
|
|
|
|
@ -436,11 +423,17 @@ def PreBuildCommonSteps(Map pipelineConfig, String projectName, String pipeline,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dir(workspace) {
|
|
|
|
|
// Add folder where we will store the 3rdParty downloads and packages
|
|
|
|
|
if(!fileExists('3rdParty')) {
|
|
|
|
|
palMkdir('3rdParty')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dir("${workspace}/${ENGINE_REPOSITORY_NAME}") {
|
|
|
|
|
|
|
|
|
|
CheckoutRepo(disableSubmodules)
|
|
|
|
|
|
|
|
|
|
// Get python
|
|
|
|
|
dir(ENGINE_REPOSITORY_NAME) {
|
|
|
|
|
if(env.IS_UNIX) {
|
|
|
|
|
sh label: 'Getting python',
|
|
|
|
|
script: 'python/get_python.sh'
|
|
|
|
|
@ -460,7 +453,6 @@ def PreBuildCommonSteps(Map pipelineConfig, String projectName, String pipeline,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def Build(Map options, String platform, String type, String workspace) {
|
|
|
|
|
|