Add global configuration for project
Use global.env file instead of setting global variables for each job.
Job environment file should contain configuration of template and should
be static. File global.env contains variables which are used by multiple
jobs. Typical content of global.env are URLs.
Variables priority: 1) use variable in job env file 2) use variable in global config if template contains it 3) use default variable in yaml template Installation of jobs using 'make install' will fail with error code in case of issue with configuration and other jobs are not applied. This behavior can be disabled by FAIL_ON_ERROR=false
Set HOME for Jenkins slaves
HOME environment variable is to /home/jenkins which is not writable.
Jenkins slave container has default value of HOME set to
/var/lib/jenkins. HOME variable is probably changed by jenkins plugin.
Do premerge testing with Jenkins files from the PR
Varibales for git checkout (WAIVERDB_GIT_REPO, WAIVERDB_GIT_BRANCH)
were evaluated during openshift template applications. Which caused that
PRs were tested with Jenkins file in master branch intead of PR ones.
Openshift BuildConfig is not able to specify git refs to be fetched and PR refs are not available, to avoid this issue WAIVERDB_GIT_REF_COMMIT contains SHA of last PR (or can be master branch).
oc process
accepts multiple--param-file
options. It will use the first definition of a parameter it finds, and ignore the rest. It may be simpler to just pass--param-file ./$(JOBS_DIR)/global.env
at the end of the command-line and remove the manual handling of the global params.