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 ->
|
platforms.each { platform ->
|
||||||
job("infra/sync-${platform}") {
|
job("infra/sync-${platform}") {
|
||||||
displayName("Synchronize ALT Linux repos for ${platform}")
|
displayName("Synchronize ALT Linux repos for ${platform}")
|
||||||
description('Runs synchronization script on PVE')
|
description('Runs synchronization script on PVE')
|
||||||
|
// The job must be run on pve node
|
||||||
label('pve')
|
label('pve')
|
||||||
environmentVariables {
|
parameters {
|
||||||
// Directory to save repository to'
|
stringParam('MIRRORS_DEST',
|
||||||
env('MIRRORS_DEST', mirrorsDest)
|
mirrorsDest,
|
||||||
// Host to download files from
|
'Directory to save repository to')
|
||||||
env('MIRRORS_SRC', mirrorsSrc)
|
stringParam('MIRRORS_SRC',
|
||||||
// ALT Linux branch to download
|
mirrorsSrc,
|
||||||
env('PLATFORM', platform)
|
'Host to download files from')
|
||||||
|
stringParam('PLATFORM',
|
||||||
|
platform,
|
||||||
|
'ALT Linux branch to download')
|
||||||
}
|
}
|
||||||
scm {
|
scm {
|
||||||
git {
|
git {
|
||||||
@ -90,10 +102,10 @@ platforms.each { platform ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wrappers {
|
wrappers {
|
||||||
sshAgent('robot_key', 'jenkins-gogs')
|
sshAgent('robot_key')
|
||||||
}
|
}
|
||||||
steps {
|
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