gradle-build

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

This Pipelines Task performs a Gradle build.

This task performs the following:

  • Performs Gradle build from input gradle command.

  • Creates Gradle configuration required for jfrog-cli.

Prerequisites

This task requires a resource that has Gradle build done and Gradle configuration available.

Usage

Basic:

- task: jfrog/gradle-build@v0.0.1
  id: gradle-build
  input:
    repoResolve: {{ .Values.deployerRepo }}
    serverIdResolve: {{ .Values.artifactory }}
    repoDeploy: {{ .Values.deployerRepo }}
    serverIdDeploy: {{ .Values.artifactory }}
    configFileLocation: /.jfrog/projects/
    configFileName: gradle.yaml
    gitResourceName: gradle_app
    sourceLocation: ""
    command: "clean artifactoryPublish -b build.gradle"
    retry: "true"

By default, the task uses JFROG_CLI_BUILD_NAME and JFROG_CLI_BUILD_NUMBER environment variables when building the build info.

Input Variables

Name

Required

Default

Description

gitResourceName

true

Resource name on which Gradle build is to be performed.

sourceLocation

false

current directory

Specifies the location of the source files. By default this is set to the root directory of the GitRepo resource. Defaults to the root of the GitRepo.

configFileLocation

false

 

Specifies the directory containing the JFrog CLI gradle-config file.

configFileName

false

 

Specifies the name of the JFrog CLI gradle-config file.

repoResolve

true

 

Artifactory repository to resolve snapshot dependencies. If set, resolverReleaseRepo is also required.

serverIdResolve

true

JFrog Platform Access Token integration or Artifactory integration name to be used to resolve gradle dependencies.

repoDeploy

true

Snapshot artifacts created by the gradleBuild are uploaded to this Artifactory repository. If set, deployerReleaseRepo is also required.

serverIdDeploy

true

JFrog Platform Access Token integration or Artifactory integration name to be used for deploying gradle deploy.

command

false

clean install

Specifies a command line string of options to use with gradle.

retry

false

false

Flag to perform retry on failure.

Output Variables

None

Exported Environment Variables

None

How does it work?

This task uses Gradle configuration generated and jfrog cli.

License

This project is licensed under Apache 2.0 license.