1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2024-12-04 10:34:42 +02:00
jenkins-lib/vars/initFromStorage.groovy

28 lines
1005 B
Groovy
Raw Normal View History

import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.utils.VRunner
2020-04-15 12:43:01 +02:00
import ru.pulsar.jenkins.library.utils.VersionParser
def call(JobConfiguration jobConfiguration) {
printLocation()
installLocalDependencies();
2020-04-15 12:43:01 +02:00
def storageVersion = VersionParser.storage()
def storageVersionParameter = storageVersion == "" ? "" : "--storage-ver $storageVersion"
withCredentials([
usernamePassword(
credentialsId: jobConfiguration.secrets.storage,
passwordVariable: 'STORAGE_PSW',
usernameVariable: 'STORAGE_USR'
),
string(
credentialsId: jobConfiguration.secrets.storagePath,
variable: 'STORAGE_PATH'
)
]) {
String vrunnerPath = VRunner.getVRunnerPath();
cmd "$vrunnerPath init-dev --storage --storage-name $STORAGE_PATH --storage-user $STORAGE_USR --storage-pwd $STORAGE_PSW $storageVersionParameter --ibconnection \"/F./build/ib\""
}
}