Skip to content

Commit

Permalink
Исправлено получение путей к файлам проекта edt.
Browse files Browse the repository at this point in the history
В случае когда ОС мастера и агента отличается
  • Loading branch information
nixel2007 committed Dec 6, 2023
1 parent 04888ec commit a7f272e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.ioc.ContextRegistry
import ru.pulsar.jenkins.library.utils.Constants
import ru.pulsar.jenkins.library.utils.EDT
import ru.pulsar.jenkins.library.utils.FileUtils
import ru.pulsar.jenkins.library.utils.Logger

class DesignerToEdtFormatTransformation implements Serializable {
Expand Down Expand Up @@ -33,10 +34,11 @@ class DesignerToEdtFormatTransformation implements Serializable {

def env = steps.env();

def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
def configurationRoot = new File(env.WORKSPACE, config.srcDir).getAbsolutePath()
def workspaceDir = FileUtils.getFilePath("$env.WORKSPACE/$WORKSPACE")
def srcDir = config.srcDir
def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$srcDir")
def edtVersionForRing = EDT.ringModule(config)

steps.deleteDir(workspaceDir)

Logger.println("Конвертация исходников из формата конфигуратора в формат EDT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ru.pulsar.jenkins.library.configuration.SourceFormat
import ru.pulsar.jenkins.library.ioc.ContextRegistry
import ru.pulsar.jenkins.library.utils.Constants
import ru.pulsar.jenkins.library.utils.EDT
import ru.pulsar.jenkins.library.utils.FileUtils
import ru.pulsar.jenkins.library.utils.Logger

class EdtToDesignerFormatTransformation implements Serializable {
Expand Down Expand Up @@ -35,9 +36,9 @@ class EdtToDesignerFormatTransformation implements Serializable {
def env = steps.env();

def srcDir = config.srcDir
def projectDir = new File("$env.WORKSPACE/$srcDir").getCanonicalPath()
def workspaceDir = "$env.WORKSPACE/$WORKSPACE"
def configurationRoot = "$env.WORKSPACE/$CONFIGURATION_DIR"
def projectDir = FileUtils.getFilePath("$env.WORKSPACE/$srcDir")
def workspaceDir = FileUtils.getFilePath("$env.WORKSPACE/$WORKSPACE")
def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$CONFIGURATION_DIR")
def edtVersionForRing = EDT.ringModule(config)

steps.deleteDir(workspaceDir)
Expand Down
4 changes: 3 additions & 1 deletion src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ru.pulsar.jenkins.library.configuration.SourceFormat
import ru.pulsar.jenkins.library.ioc.ContextRegistry
import ru.pulsar.jenkins.library.utils.Constants
import ru.pulsar.jenkins.library.utils.EDT
import ru.pulsar.jenkins.library.utils.FileUtils
import ru.pulsar.jenkins.library.utils.Logger

class EdtValidate implements Serializable {
Expand Down Expand Up @@ -40,7 +41,8 @@ class EdtValidate implements Serializable {

projectList = "--project-name-list $DesignerToEdtFormatTransformation.PROJECT_NAME"
} else {
String projectDir = new File("$env.WORKSPACE/$config.srcDir").getCanonicalPath()
def srcDir = config.srcDir
def projectDir = FileUtils.getFilePath("$env.WORKSPACE/$srcDir")
projectList = "--project-list \"$projectDir\""
}

Expand Down

0 comments on commit a7f272e

Please sign in to comment.