Blue Ocean Jenkins 中是否有解决此错误的方法
Is there a solution to this error in Blue Ocean Jenkins
我正在使用 Jenkins 并使用 Blue Ocean 创建了这个管道,在 运行 连接管道
时出现了这个错误
我该如何解决这个问题?
这是我的 Jenkins 文件代码,当我 运行 gradle 在本地存储库中构建 gradle javadoc 时它可以工作,但是当我 运行 它在 Jenkins 服务器中时它不起作用'没工作
pipeline {
agent any
stages {
stage('Build') {
steps {
bat 'gradle build'
bat 'gradle javadoc'
archiveArtifacts 'build/libs/*.jar'
archiveArtifacts 'build/docs/javadoc/**'
junit 'build/test-results/test/*.xml'
}
}
stage('Mail Notification') {
steps {
mail(subject: 'Build Notification', body: 'This is a notification letting you know that the build stage has finished', to: 'hs_hendel@esi.dz', cc: 'samdz161999@gmail.com', from: 'hs_hendel@esi.dz')
}
}
stage('Code Analysis') {
parallel {
stage('Code Analysis') {
steps {
withSonarQubeEnv('sonar') {
bat 'gradle sonarQube'
}
waitForQualityGate true
}
}
stage('Test Reporting') {
steps {
cucumber 'reports/example-report.json'
}
}
}
}
stage('Deployment') {
steps {
bat 'gradle publish'
}
}
stage('Slack Notification') {
steps {
slackSend(baseUrl: 'https://hooks.slack.com/services', channel: '#tp-ogl', notifyCommitters: true, sendAsText: true, username: 'ik_mehar', message: 'This is a slack notification letting you know that he process has finished ', replyBroadcast: true, teamDomain: 'https://app.slack.com/client', token: 'T02T8KCN5DY/B02T22U3D8W/sn96ULIXJfQN7FOkx21nm84s')
}
}
}
}
模块导出错误表示您的 Jenkins 环境中使用的 Java 版本与您项目的 Gradle 版本不兼容。
在不知道 Jenkins 环境中使用的 Java 版本和本地计算机上的版本的情况下,您需要确保 Jenkins 环境中的版本与 Gradle 的版本兼容在项目中使用。
查看兼容性矩阵以确定 Gradle 版本和 Java 版本兼容:https://docs.gradle.org/current/userguide/compatibility.html
我正在使用 Jenkins 并使用 Blue Ocean 创建了这个管道,在 运行 连接管道
我该如何解决这个问题?
这是我的 Jenkins 文件代码,当我 运行 gradle 在本地存储库中构建 gradle javadoc 时它可以工作,但是当我 运行 它在 Jenkins 服务器中时它不起作用'没工作
pipeline {
agent any
stages {
stage('Build') {
steps {
bat 'gradle build'
bat 'gradle javadoc'
archiveArtifacts 'build/libs/*.jar'
archiveArtifacts 'build/docs/javadoc/**'
junit 'build/test-results/test/*.xml'
}
}
stage('Mail Notification') {
steps {
mail(subject: 'Build Notification', body: 'This is a notification letting you know that the build stage has finished', to: 'hs_hendel@esi.dz', cc: 'samdz161999@gmail.com', from: 'hs_hendel@esi.dz')
}
}
stage('Code Analysis') {
parallel {
stage('Code Analysis') {
steps {
withSonarQubeEnv('sonar') {
bat 'gradle sonarQube'
}
waitForQualityGate true
}
}
stage('Test Reporting') {
steps {
cucumber 'reports/example-report.json'
}
}
}
}
stage('Deployment') {
steps {
bat 'gradle publish'
}
}
stage('Slack Notification') {
steps {
slackSend(baseUrl: 'https://hooks.slack.com/services', channel: '#tp-ogl', notifyCommitters: true, sendAsText: true, username: 'ik_mehar', message: 'This is a slack notification letting you know that he process has finished ', replyBroadcast: true, teamDomain: 'https://app.slack.com/client', token: 'T02T8KCN5DY/B02T22U3D8W/sn96ULIXJfQN7FOkx21nm84s')
}
}
}
}
模块导出错误表示您的 Jenkins 环境中使用的 Java 版本与您项目的 Gradle 版本不兼容。
在不知道 Jenkins 环境中使用的 Java 版本和本地计算机上的版本的情况下,您需要确保 Jenkins 环境中的版本与 Gradle 的版本兼容在项目中使用。
查看兼容性矩阵以确定 Gradle 版本和 Java 版本兼容:https://docs.gradle.org/current/userguide/compatibility.html