Repo root as parameter.
This commit is contained in:
parent
e0d5dcdb0b
commit
3edd25bf20
|
@ -36,11 +36,15 @@ pipeline {
|
|||
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
|
||||
ACTION_REPORT = "${agent_root_folder}/actions.${env.BUILD_NUMBER}.csv"
|
||||
BASH_FRAGMENT="${action_code}"
|
||||
REPO_ROOT="${repo_root}"
|
||||
|
||||
}
|
||||
|
||||
parameters {
|
||||
|
||||
string(name: 'repo_root',
|
||||
defaultValue: 'https://code-repo.d4science.org/gCube/',
|
||||
description: 'The root URL of the repositories')
|
||||
string(name: 'repo_list',
|
||||
defaultValue: 'default_list.txt',
|
||||
description: 'The file with the list of repositories to update')
|
||||
|
@ -48,6 +52,7 @@ pipeline {
|
|||
defaultValue: '',
|
||||
description: 'The file with the Bash fragment to execute.')
|
||||
|
||||
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -111,7 +116,7 @@ pipeline {
|
|||
* NOTE: 'credentialsId' be manually configured in Jenkins to access all the repos
|
||||
*/
|
||||
def checkout_and_exec(repo_name, actions) {
|
||||
def repo_url = "https://code-repo.d4science.org/manuele.simi/{$repo_name}"
|
||||
def repo_url = "${repo_root}/{$repo_name}"
|
||||
echo "Checkout SHA from reference $commit"
|
||||
sh(script: "rm -r ${repo_name} || true", returnStdout: true)?.trim()
|
||||
checkout([
|
||||
|
|
Loading…
Reference in New Issue