add and modify erb files for dynamic jenkins jobs

This commit fixes various bugs and issues with the erb templates for
packaging and repo. Mainly spelling errors or mislabeled variables.
use current build parameters
Revert "use current build parameters"

This reverts commit 3f8c3b78fac2ff3cb5be9638e65f58ce0c68b477.
Pass REF in as well