Address PR comments

This commit is contained in:
John
2021-06-25 10:18:29 +01:00
parent b34845b496
commit cfe839e89e
+5 -3
View File
@@ -18,7 +18,7 @@ EMPTY_JSON = readJSON text: '{}'
ENGINE_REPOSITORY_NAME = 'o3de'
BUILD_SNAPSHOTS = ['development', 'stabilization/2106']
BUILD_SNAPSHOTS = ['development', 'stabilization/2106', '']
DEFAULT_BUILD_SNAPSHOT = BUILD_SNAPSHOTS.get(0)
def pipelineProperties = []
@@ -458,10 +458,10 @@ try {
branchName = env.BRANCH_NAME
} else {
branchName = scm.branches[0].name // for non-multibranch pipelines
env.BRANCH_NAME = branchName // so scripts that read this environment have it (e.g. incremental_build_util.py)
choice(defaultValue: DEFAULT_BUILD_SNAPSHOT, name: 'SNAPSHOT', choices: BUILD_SNAPSHOTS, description: 'Selects the build snapshot to use. A more diverted snapshot will cause longer build times, but will not cause build failures.')
env.BRANCH_NAME = branchName // so scripts that read this environment have it (e.g. incremental_build_util.py)
}
if(env.CHANGE_TARGET) {
// PR builds
if(BUILD_SNAPSHOTS.contains(env.CHANGE_TARGET)) {
snapshot = env.CHANGE_TARGET
echo "Snapshot for destination branch \"${env.CHANGE_TARGET}\" found."
@@ -470,6 +470,8 @@ try {
echo "Snapshot for destination branch \"${env.CHANGE_TARGET}\" does not exist, defaulting to snapshot \"${snapshot}\""
}
} else {
// Non-PR builds
choice(defaultValue: DEFAULT_BUILD_SNAPSHOT, name: 'SNAPSHOT', choices: BUILD_SNAPSHOTS, description: 'Selects the build snapshot to use. A more diverted snapshot will cause longer build times, but will not cause build failures.')
snapshot = env.SNAPSHOT
echo "Snapshot \"${snapshot}\" selected."
}