При запуске проекта на pipeline проект падает с ошибкой.
Ниже привел код из файла Jenkins в проекте и результат из консоли.
pipeline {
agent any
tools {
maven 'maven'
allure 'allure'
}
stages {
stage('clone repository') {
steps {
deleteDir()
git branch: 'master', credentialsId: 'gitlab_new', url: 'https://github.com/ZergEmpire/TestFirst.git'
}
}
stage('run tests') {
steps {
sh "mvn test -Dselenide.browser=chrome -Dselenide.remote=http://192.168.1.17:8080/wd/hub"
}
}
stage('generate allure report') {
steps {
allure includeProperties: false, jdk: '', results: [[path: 'target/allure-results']]
}
}
}
}
Started by user Kavalerov
Obtained Jenkinsfile from git https://github.com/ZergEmpire/TestFirst
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/jenkins_home/workspace/AutoTest
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
No credentials specified
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/AutoTest/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/ZergEmpire/TestFirst # timeout=10
Fetching upstream changes from https://github.com/ZergEmpire/TestFirst
> git --version # timeout=10
> git --version # 'git version 2.20.1'
> git fetch --tags --force --progress -- https://github.com/ZergEmpire/TestFirst +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 # timeout=10
Commit message: "Deleted Allure results2"
> git rev-list --no-walk 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Tool Install)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] tool
Invalid tool ID 2.26.0
[Pipeline] envVarsForTool
Invalid tool ID 2.26.0
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (clone repository)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] tool
Invalid tool ID 2.26.0
[Pipeline] envVarsForTool
Invalid tool ID 2.26.0
[Pipeline] withEnv
[Pipeline] {
[Pipeline] deleteDir
[Pipeline] git
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
Warning: CredentialId "gitlab_new" could not be found.
Cloning the remote Git repository
Cloning repository https://github.com/ZergEmpire/TestFirst.git
> git init /var/jenkins_home/workspace/AutoTest # timeout=10
Fetching upstream changes from https://github.com/ZergEmpire/TestFirst.git
> git --version # timeout=10
> git --version # 'git version 2.20.1'
> git fetch --tags --force --progress -- https://github.com/ZergEmpire/TestFirst.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/ZergEmpire/TestFirst.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 # timeout=10
> git branch -a -v --no-abbrev # timeout=10
> git checkout -b master 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 # timeout=10
Commit message: "Deleted Allure results2"
> git rev-list --no-walk 0c25c0bdb0022c006f208dfba12e58ea6a90b4f2 # timeout=10
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (run tests)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] tool
Invalid tool ID 2.26.0
[Pipeline] envVarsForTool
Invalid tool ID 2.26.0
[Pipeline] withEnv
[Pipeline] {
[Pipeline] sh
+ mvn test -Dselenide.browser=chrome -Dselenide.remote=http://192.168.1.17:8080/wd/hub
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< TestProjectForAll:TestFirst >---------------------
[INFO] Building TestFirst 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestFirst ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/AutoTest/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ TestFirst ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ TestFirst ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/AutoTest/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ TestFirst ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/jenkins_home/workspace/AutoTest/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ TestFirst ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.891 s
[INFO] Finished at: 2021-07-12T16:27:43Z
[INFO] ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (generate allure report)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] tool
Invalid tool ID 2.26.0
[Pipeline] envVarsForTool
Invalid tool ID 2.26.0
[Pipeline] withEnv
[Pipeline] {
[Pipeline] allure
Invalid tool ID 2.26.0
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: Can't find allure commandline <null>
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$GetMajorVersion.call(AllureCommandlineInstallation.java:74)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$GetMajorVersion.call(AllureCommandlineInstallation.java:65)
at hudson.remoting.LocalChannel.call(LocalChannel.java:46)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getMajorVersion(AllureCommandlineInstallation.java:63)
at ru.yandex.qatools.allure.jenkins.ReportBuilder.build(ReportBuilder.java:52)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:312)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE