You've already forked jenkins-lib
mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-08-25 20:09:25 +02:00
Методы получения имени агента для 1с и для едт внесены в класс JobConfiguration
This commit is contained in:
@@ -94,4 +94,16 @@ class JobConfiguration implements Serializable {
|
|||||||
return (initMethod == InitInfoBaseMethod.FROM_SOURCE) ||
|
return (initMethod == InitInfoBaseMethod.FROM_SOURCE) ||
|
||||||
(initMethod == InitInfoBaseMethod.DEFAULT_BRANCH_FROM_STORAGE && branchName != defaultBranch)
|
(initMethod == InitInfoBaseMethod.DEFAULT_BRANCH_FROM_STORAGE && branchName != defaultBranch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String v8version() {
|
||||||
|
return v8version
|
||||||
|
}
|
||||||
|
|
||||||
|
String edtVersionForRing() {
|
||||||
|
String edtVersionForRing = "edt"
|
||||||
|
if (edtVersion != '') {
|
||||||
|
edtVersionForRing += "@" + edtVersion
|
||||||
|
}
|
||||||
|
return edtVersionForRing
|
||||||
|
}
|
||||||
}
|
}
|
@@ -34,17 +34,13 @@ class DesignerToEdtFormatTransformation implements Serializable {
|
|||||||
|
|
||||||
def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
|
def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
|
||||||
def configurationRoot = new File(env.WORKSPACE, config.srcDir).getAbsolutePath()
|
def configurationRoot = new File(env.WORKSPACE, config.srcDir).getAbsolutePath()
|
||||||
|
def edtVersionForRing = config.edtVersionForRing()
|
||||||
|
|
||||||
steps.deleteDir(workspaceDir)
|
steps.deleteDir(workspaceDir)
|
||||||
|
|
||||||
Logger.println("Конвертация исходников из формата конфигуратора в формат EDT")
|
Logger.println("Конвертация исходников из формата конфигуратора в формат EDT")
|
||||||
|
|
||||||
String edtVersion = "edt"
|
def ringCommand = "ring $edtVersionForRing workspace import --configuration-files \"$configurationRoot\" --project-name $PROJECT_NAME --workspace-location \"$workspaceDir\""
|
||||||
if (config.edtVersion != '') {
|
|
||||||
edtVersion += "@" + config.edtVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
def ringCommand = "ring $edtVersion workspace import --configuration-files \"$configurationRoot\" --project-name $PROJECT_NAME --workspace-location \"$workspaceDir\""
|
|
||||||
|
|
||||||
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
||||||
steps.withEnv(ringOpts) {
|
steps.withEnv(ringOpts) {
|
||||||
|
@@ -37,18 +37,14 @@ class EdtToDesignerFormatTransformation implements Serializable {
|
|||||||
def projectDir = new File("$env.WORKSPACE/$srcDir").getCanonicalPath()
|
def projectDir = new File("$env.WORKSPACE/$srcDir").getCanonicalPath()
|
||||||
def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
|
def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
|
||||||
def configurationRoot = "$env.WORKSPACE/$CONFIGURATION_DIR"
|
def configurationRoot = "$env.WORKSPACE/$CONFIGURATION_DIR"
|
||||||
|
def edtVersionForRing = config.edtVersionForRing()
|
||||||
|
|
||||||
steps.deleteDir(workspaceDir)
|
steps.deleteDir(workspaceDir)
|
||||||
steps.deleteDir(configurationRoot)
|
steps.deleteDir(configurationRoot)
|
||||||
|
|
||||||
Logger.println("Конвертация исходников из формата EDT в формат Конфигуратора")
|
Logger.println("Конвертация исходников из формата EDT в формат Конфигуратора")
|
||||||
|
|
||||||
String edtVersion = "edt"
|
def ringCommand = "ring $edtVersionForRing workspace export --workspace-location \"$workspaceDir\" --project \"$projectDir\" --configuration-files \"$configurationRoot\""
|
||||||
if (config.edtVersion != '') {
|
|
||||||
edtVersion += "@" + config.edtVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
def ringCommand = "ring $edtVersion workspace export --workspace-location \"$workspaceDir\" --project \"$projectDir\" --configuration-files \"$configurationRoot\""
|
|
||||||
|
|
||||||
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
||||||
steps.withEnv(ringOpts) {
|
steps.withEnv(ringOpts) {
|
||||||
|
@@ -44,15 +44,11 @@ class EdtValidate implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def resultFile = "$env.WORKSPACE/$RESULT_FILE"
|
def resultFile = "$env.WORKSPACE/$RESULT_FILE"
|
||||||
|
def edtVersionForRing = config.edtVersionForRing()
|
||||||
|
|
||||||
Logger.println("Выполнение валидации EDT")
|
Logger.println("Выполнение валидации EDT")
|
||||||
|
|
||||||
String edtVersion = "edt"
|
def ringCommand = "ring $edtVersionForRing workspace validate --workspace-location \"$workspaceLocation\" --file \"$resultFile\" $projectList"
|
||||||
if (config.edtVersion != '') {
|
|
||||||
edtVersion += "@" + config.edtVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
def ringCommand = "ring $edtVersion workspace validate --workspace-location \"$workspaceLocation\" --file \"$resultFile\" $projectList"
|
|
||||||
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
def ringOpts = [Constants.DEFAULT_RING_OPTS]
|
||||||
steps.withEnv(ringOpts) {
|
steps.withEnv(ringOpts) {
|
||||||
steps.catchError {
|
steps.catchError {
|
||||||
|
@@ -38,11 +38,8 @@ void call() {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
config = jobConfiguration() as JobConfiguration
|
config = jobConfiguration() as JobConfiguration
|
||||||
agent1C = config.v8version
|
agent1C = config.v8version()
|
||||||
agentEdt = "edt"
|
agentEdt = config.edtVersionForRing()
|
||||||
if (config.edtVersion != '') {
|
|
||||||
agentEdt += "@" + config.edtVersion
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user