Artifactory Gradle构建在Azure DevOps管道中失败。

huangapple go评论65阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年3月7日 03:35:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/75655096.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定