Maven release jobs can also trigger via "Build with parameters" negating the need for a release file.
The parameters will need to be filled out in the same was as a release file's would, excepting the speacial
-RELEASE_FILE parameter which will need to be set to False to inform the job that it should not expect a release file.
+USE_RELEASE_FILE parameter which will need to be set to False to inform the job that it should not expect a release file.
The Special Parameters are as follows:
GERRIT_BRANCH = master
VERSION = 1.0.0
LOG_DIR = example-project-maven-stage-master/17/
DISTRIBUTION_TYPE = maven
-RELEASE_FILE = False
+USE_RELEASE_FILE = false
.. note::
default: ""
description: "Set to maven for build with parametes"
- bool:
- name: RELEASE_FILE
+ name: USE_RELEASE_FILE
default: "{use-release-file}"
description: "Set to False for job built with parameters"
--- /dev/null
+---
+fixes:
+ - |
+ Rename "RELEASE_FILE" parameter to "USE_RELEASE_FILE" in release-jobs.
+ This will match the actual varaible default value better and will not
+ collide with the local "release_file" in the script.
+ - |
+ Fix "USE_RELEASE_FILE" if statement. We are now using a bool instead of
+ a string. Changing the if statements to evaluate bools.
exit 1
fi
-RELEASE_FILE="${RELEASE_FILE:-True}"
-if [[ "$RELEASE_FILE" == "True" ]]; then
+if $USE_RELEASE_FILE ; then
release_files=$(git diff-tree --no-commit-id -r "$GERRIT_PATCHSET_REVISION" --name-only -- "releases/" ".releases/")
if (( $(grep -c . <<<"$release_files") > 1 )); then
fi
else
- echo "This is job is built with parameters, no release file needed"
+ echo "This job is built with parameters, no release file needed. Continuing..."
release_file="None"
fi
if [[ "$DISTRIBUTION_TYPE" == "maven" ]]; then
wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/release-schema.yaml
RELEASE_SCHEMA="release-schema.yaml"
- if [[ "$RELEASE_FILE" == "True" ]]; then
+ if $USE_RELEASE_FILE ; then
verify_schema
fi
maven_release_file