- inject:
properties-file: gerrit_custom_dependencies.properties
- # rootbuild requires a checkout of modules
+ # rootbuild requires a checkout of modules, but only
+ # when we don't depend on a specific lttng-modules change
- conditional-step:
- condition-kind: regex-match
- label: '$JOB_NAME'
- regex: '.*_root(?:_[a-z]+)?build.*'
+ condition-kind: and
+ on-evaluation-failure: run
+ condition-operands:
+ - condition-kind: shell
+ condition-command: 'test "$GERRIT_DEP_LTTNG_MODULES" = ""'
+ - condition-kind: regex-match
+ label: '$JOB_NAME'
+ regex: '.*_root(?:_[a-z]+)?build.*'
steps:
- shell: |
#!/bin/bash
if [ "$project" = "lttng-modules" ]; then
if [ -d "$WORKSPACE/src/lttng-modules" ]; then
# Remove the regular modules sources to replace them with those
- # from the gerrit change
+ # from the gerrit change
rm -rf "$WORKSPACE/src/lttng-modules"
- else
- # This job does not require modules sources
- continue
- fi
+ fi
fi
# Export the GERRIT_DEP_... into the property file for further jenkins usage