英文:
Artifactory Gradle build getting failed in Azure DevOps pipeline
问题
我们有一个Azure DevOps管道,用Artifactory Gradle任务构建Android包,如下所示。我们正在使用自托管代理,并安装了Gradle以及Gradle主目录。
已配置的环境变量如下:
GRADLE_HOME=/opt/gradle-8.0.2
PATH=/opt/gradle-8.0.2/bin
管道任务如下:
- 任务:JFrogGradle@1
输入:
gradleBuildFile: 'build.gradle'
workDir: 'Android'
tasks: 'artifactoryPublish'
artifactoryResolverService: 'artifactory-central'
collectBuildInfo: true
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildNumber)'
usesPlugin: true
useWrapper: true
但是构建未执行,因为找不到Gradle。
错误:
##[error]No agent found in pool which satisfies the following demand: gradle. All demands: agent.name -equals azdevops, java, gradle, Agent.Version -gtVersion 2.170.
英文:
We have an Azure DevOps pipeline to build android package using an Artifactory Gradle task as below. We are using self hosted agent and installed Gradle along with Gradle home directory.
ENV variable configured as
GRADLE_HOME=/opt/gradle-8.0.2
PATH=/opt/gradle-8.0.2/bin
Pipeline task is below
- task: JFrogGradle@1
inputs:
gradleBuildFile: 'build.gradle'
workDir: 'Android'
tasks: 'artifactoryPublish'
artifactoryResolverService: 'artifactory-central'
collectBuildInfo: true
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildNumber)'
usesPlugin: true
useWrapper: true
But the builds are not getting executed, as it couldn't find Gradle
Error
> ##[error]No agent found in pool which satisfies the following demand: gradle. All demands: agent.name -equals azdevops, java, gradle, Agent.Version -gtVersion 2.170.
答案1
得分: 1
这个问题已在扩展版本2.4.2中 修复。
欢迎您在将来通过项目的 GitHub 直接 提出问题。
英文:
This issue was fixed as part of version 2.4.2 of the extension.
You are welcome to open issues directly through the project's GitHub in the future.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论