This video provided the guidance I was looking for:
https://www.youtube.com/watch?v=KwQDxwZRZiE
And my solution looks like this:
pipeline {
agent any
parameters {
choice( name: 'project_short_code', description: 'The short code for this project', choices: ['foo','bar'])
}
stages {
}
stage('Clone site code to build envornment') {
steps {
script {
def projects = readYaml file: "build_scripts/9999-build_properties_for_project_code.yaml"
env.our_project_repo = projects.project_code."${project_short_code}".our_project_repo
env.site_deploy_target = projects.project_code."${project_short_code}".site_deploy_target
}
dir("./${env.site_deploy_target}") {
git branch: "${site_tag}", credentialsId: "${ssh_credentials}", url: "${env.our_project_repo}"
}
}
}
}
}
Apparently, an assignment to an env.FOO requires no def keyword, and, at least in the same context, can be accessed as ${env.FOO}.