diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-06-23 19:14:42 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-06-23 19:49:56 +0200 |
commit | e05f59a7ddcfee39c04d8f95bfb04031210c6471 (patch) | |
tree | 6ae974e6acc1a78884d11265e9fdfdd2acb63e35 /vars/getChangeSetPath.groovy | |
parent | b594ef70198779cada40db859f82b5ebe49b2a22 (diff) | |
download | vyos-build-e05f59a7ddcfee39c04d8f95bfb04031210c6471.tar.gz vyos-build-e05f59a7ddcfee39c04d8f95bfb04031210c6471.zip |
Jenkins: lib: T2625: add getChangeSetPath() function
Retrieve the path where git should check for modified files to trigger
the pipeline build or not.
Diffstat (limited to 'vars/getChangeSetPath.groovy')
-rw-r--r-- | vars/getChangeSetPath.groovy | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vars/getChangeSetPath.groovy b/vars/getChangeSetPath.groovy new file mode 100644 index 00000000..f046d7cc --- /dev/null +++ b/vars/getChangeSetPath.groovy @@ -0,0 +1,25 @@ +#!/usr/bin/env groovy +// Copyright (C) 2020 VyOS maintainers and contributors +// +// This program is free software; you can redistribute it and/or modify +// in order to easy exprort images built to "external" world +// it under the terms of the GNU General Public License version 2 or later as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + +def call() { + tmp = getJenkinsfilePath() + if (tmp) + tmp = "**/" + tmp + "*" + else + tmp = "**/*" + return tmp +} + |