Synchronization script invocation reconfigured
This commit is contained in:
parent
54f656831e
commit
56567a7333
@ -64,18 +64,30 @@ folder('infra') {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate jobs to syncrinize various repos. The process looks like
|
||||
* this:
|
||||
* 1) Checkout this repo;
|
||||
* 2) Run synchronization script with paths set via environment
|
||||
* variables;
|
||||
* 3) Cleanup workspace;
|
||||
*/
|
||||
platforms.each { platform ->
|
||||
job("infra/sync-${platform}") {
|
||||
displayName("Synchronize ALT Linux repos for ${platform}")
|
||||
description('Runs synchronization script on PVE')
|
||||
// The job must be run on pve node
|
||||
label('pve')
|
||||
environmentVariables {
|
||||
// Directory to save repository to'
|
||||
env('MIRRORS_DEST', mirrorsDest)
|
||||
// Host to download files from
|
||||
env('MIRRORS_SRC', mirrorsSrc)
|
||||
// ALT Linux branch to download
|
||||
env('PLATFORM', platform)
|
||||
parameters {
|
||||
stringParam('MIRRORS_DEST',
|
||||
mirrorsDest,
|
||||
'Directory to save repository to')
|
||||
stringParam('MIRRORS_SRC',
|
||||
mirrorsSrc,
|
||||
'Host to download files from')
|
||||
stringParam('PLATFORM',
|
||||
platform,
|
||||
'ALT Linux branch to download')
|
||||
}
|
||||
scm {
|
||||
git {
|
||||
@ -90,10 +102,10 @@ platforms.each { platform ->
|
||||
}
|
||||
}
|
||||
wrappers {
|
||||
sshAgent('robot_key', 'jenkins-gogs')
|
||||
sshAgent('robot_key')
|
||||
}
|
||||
steps {
|
||||
shell(readFileFromWorkspace('scripts/sync_alt_repo'))
|
||||
shell("/usr/bin/env MIRRORS_DEST=${MIRRORS_DEST} MIRRORS_SRC=${MIRRORS_SRC} PLATFORM=${PLATFORM} ./scripts/sync_alt_repo")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user