Address PR comments

Signed-off-by: John <jonawals@amazon.com>
monroegm-disable-blank-issue-2
John 5 years ago
parent 3c31424e92
commit cfe4a49136

@ -18,7 +18,7 @@ EMPTY_JSON = readJSON text: '{}'
ENGINE_REPOSITORY_NAME = 'o3de' ENGINE_REPOSITORY_NAME = 'o3de'
BUILD_SNAPSHOTS = ['development', 'stabilization/2106'] BUILD_SNAPSHOTS = ['development', 'stabilization/2106', '']
DEFAULT_BUILD_SNAPSHOT = BUILD_SNAPSHOTS.get(0) DEFAULT_BUILD_SNAPSHOT = BUILD_SNAPSHOTS.get(0)
def pipelineProperties = [] def pipelineProperties = []
@ -458,10 +458,10 @@ try {
branchName = env.BRANCH_NAME branchName = env.BRANCH_NAME
} else { } else {
branchName = scm.branches[0].name // for non-multibranch pipelines 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) 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.')
} }
if(env.CHANGE_TARGET) { if(env.CHANGE_TARGET) {
// PR builds
if(BUILD_SNAPSHOTS.contains(env.CHANGE_TARGET)) { if(BUILD_SNAPSHOTS.contains(env.CHANGE_TARGET)) {
snapshot = env.CHANGE_TARGET snapshot = env.CHANGE_TARGET
echo "Snapshot for destination branch \"${env.CHANGE_TARGET}\" found." 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}\"" echo "Snapshot for destination branch \"${env.CHANGE_TARGET}\" does not exist, defaulting to snapshot \"${snapshot}\""
} }
} else { } 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 snapshot = env.SNAPSHOT
echo "Snapshot \"${snapshot}\" selected." echo "Snapshot \"${snapshot}\" selected."
} }

Loading…
Cancel
Save