项目作者: cdancy

项目描述 :
Gradle plugin for working with Artifactory's REST API
高级语言: Groovy
项目地址: git://github.com/cdancy/gradle-artifactory-rest-plugin.git
创建时间: 2016-02-25T12:29:07Z
项目社区:https://github.com/cdancy/gradle-artifactory-rest-plugin

开源协议:Apache License 2.0

下载


Build Status
codecov
Download
Stack Overflow

gradle-artifactory-rest-plugin

Gradle plugin, based on jclouds, for interacting with Artifactory’s REST API.

Setup

Plugin is hosted on gradles plugin-portal so build scripts may have to be adjusted to account for this.

  1. plugins {
  2. id("com.github.gradle.artifactory.rest") version "X.Y.Z"
  3. }

Extension

The artifactoryRest extension is provided to define the endpoint and credentials for connecting to an Artifactory instance. Using the extension, and subsequently exposing this potentially private information, is required only if one does NOT want to use the various means of setting the aforementioned properties noted in the Credentials section below.

Because we are built on top of jclouds we can take advantage of overriding various internal HTTP properties by
setting the overrides property or, and in following with the spirit of this plugin, configuring them
through System Properties of Environment Variables. Further directions on how to set them through System Properties and Environment Variables can be found HERE.

The properties a given client can configure can be
found HERE.

  1. artifactoryRest {
  2. url { "https://localhost:8081/artifactory" } // Optional and can be sourced from sys-prop/env-var. Default to shown URL.
  3. credentials { "admin:password" } // Optional and can be sourced from sys-prop/env-var. Default to anonymous auth.
  4. // Optional and can be sourced from sys-prop/env-var.
  5. overrides = ["jclouds.so-timeout" : "300000",
  6. "jclouds.connection-timeout" : "300000",
  7. "jclouds.retries-delay-start" : "60000",
  8. "jclouds.max-retries" : "5" ]
  9. }

Credentials

Because this plugin builds on top of artifactory-rest library one can supply
credentials in any form this library accepts. Furthermore,
artifactory-rest allows the endpoint and credentials
to be optionally supplied through properties or environment variables. This gives great flexibility in the way the user
wants to define and/or hide their credentials assuming one does not want to use the artifactoryRest extension.