Code Monkey home page Code Monkey logo

artifactory-user-plugins's People

Contributors

aaronsrhodes avatar achana-anz avatar alexanderdenkbmw avatar alexeivainshtein avatar alexhung avatar alextu avatar angellomaggio avatar annarozin avatar aseftel avatar axel3rd avatar darthfennec avatar davidshinjfrog avatar edwardl50 avatar elig avatar freddy33 avatar imranonline avatar jainishshah17 avatar jbaruch avatar lpshikhar avatar maggioangello avatar manojtug avatar nitaym13 avatar nyadav08 avatar shaybagants avatar shrajfr12 avatar stanlef avatar trisquel87 avatar turhsus avatar uriahl avatar yoav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artifactory-user-plugins's Issues

Lack of documentation for security plugins

urls field in index.yaml uses local://

The urls field in the generated index.yaml looks like:

    urls:
    - local://webapp-0.2.3.tgz

Instead of local://, it should have the path to download the chart from artifactory.

archiveOldArtifacts Get error messages. result: the artifact is gone!

When testing this user plugin, I get errors with the result that the artifact is gone.

I try to do: curl -X POST -v -u admin:xxxxxxxxx "http://xx.xx.xx.xx:0000/artifactory/api/plugins/execute/archive_old_artifacts?params=srcRepo=mvn-legacy-local%7CarchiveRepo=archive-local%7CfilePattern=*.war%7CageDays=100"

I get the following ERROR messages:
2018-01-11 09:26:40,388 [http-nio-8081-exec-7] [WARN ] (archiveOldArtifacts :258) - About to archive artifact: mvn-legacy-local:Nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war
2018-01-11 09:26:40,392 [http-nio-8081-exec-7] [INFO ] (o.a.e.UploadServiceImpl:512) - Deploy to 'mvn-legacy-local:Nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war' Content-Length: unspecified
2018-01-11 09:26:40,401 [http-nio-8081-exec-7] [ERROR] (archiveOldArtifacts :268) - Call to deploy artifact mvn-legacy-local:Nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war failed!
2018-01-11 09:26:40,418 [http-nio-8081-exec-7] [ERROR] (archiveOldArtifacts :309) - Call to move artifact mvn-legacy-local:Nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war failed!

Result: There is only one entry in the archive-local repo of the 1-byte large war file. In the srcRepo there is no reference anymore and the 'displaced' war file has completely disappeared.
And I can't get any info anymore from the 'moved' war file through the storage api call.

The original information of the artefact is:

"repo" : "mvn-legacy-local",
"path" : "/Nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war",
"created" : "2016-01-17T05:06:26.728+01:00",
"createdBy" : "anonymous",
"lastModified" : "2015-10-13T12:20:08.000+02:00",
"modifiedBy" : "anonymous",
"lastUpdated" : "2016-01-17T05:06:26.733+01:00",
"mimeType" : "application/java-archive",
"size" : "22005826",
"checksums" : {
"sha1" : "83f34a46b112175ba079090fb379048f84563e84",
"md5" : "de9bb0a0fac32c5b6de2fb1a8c56c620"
},
"originalChecksums" : {
"sha1" : "83f34a46b112175ba079090fb379048f84563e84",
"md5" : "de9bb0a0fac32c5b6de2fb1a8c56c620"
},
"uri" : "http://ota-portal.so.kadaster.nl/artifactory/api/storage/mvn-legacy-local/nl/kadaster/brkbag/monitor/appl/monitor-application-web/1.0.1.14/monitor-application-web-1.0.1.14.war"

Please advice

Initial Stable Release?

Any thoughts on when the stable release will be made available? We are looking into having conda package manager work with Artifactory.

Thanks.

Missing parameters for deleteEmptyDirs script

Need to add -H "Content-Length: 0" to the curl command like so:

curl -X POST -v -u admin:password "http://localhost:8080/artifactory/api/plugins/execute/deleteEmptyDirsPlugin?params=paths=repo,otherRepo/some/path" -H "Content-Length: 0"

Otherwise, you get the following error:

<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

securityReplication does not work with LDAP users

I am in process of merging two used-to-be-separate Artifactory instances (4.x) and the securityReplication plugin does not correctly sync encrypted passwords or API keys of LDAP users.

Local users work without an issue, for LDAP users I can see in the log that a patch is created and sent, but nothing changes in the slave instance.

FilestoreIntegrity plugin ignores different binarystore data directories

Symptoms:
When running the filestoreIntegrity plugin execution endpoint, the plugin will only look in the local Artifactory data directory, unless a different one is specified in an HA configuration. This results in unintended errors, such as reporting all Artifactory binaries are missing.

Steps to reproduce:

  1. Move a healthy Artifactory filestore to a simulated mount in a different location
  2. Modify the Binarystore.xml as per the documentation to point to the "NFS mount" alternate location
  3. Load the plugin,
  4. Either see an incorrect assessment (If the "filestore" directory still exists) or a 500 error:
    {
    "errors" : [ {
    "status" : 500,
    "message" : "Error reading files from '/home/jfrog/programs/artifactory-pro-5.2.1/data/filestore': the directory is either empty, inaccessible, or gone. This Artifactory instance may be using a binary provider that is unsupported by this plugin."
    } ]
    }

Workaround: Symlink the $ARTIFACTORY_HOME/data/filestore folder to point to the actual filestore mount.

artifactCleanup scheduled job defined in source code

The CRON scheduled job is defined in the source code, but would be better as configurable via properties file.

Further all policies are scheduled on a single CRON.

The pull request used on commit solves these two issues, making the plugin more easily configurable and not requiring the script to be changed.

User plugins not working with Artifactory upgrade 5.1.0

Hi the ArtifactCleanup and other plugins have stopped working after the upgrade to 5.1.0

The logs show that the plugins were successfully registered but trying to execute a function causes a HTTP 400 BAd request error

Fatal error loading artifactCleanup plugin

Artifactory Pro v5.3.0

2017-05-14 02:10:28,393 [Thread-5] [INFO ] (o.a.c.c.ConfigurationManagerImpl:352) - [Node ID: e82128d978aa01c3:-ae144a7:15c04b4f4d7:-8000] detected local modify for config 'artifactory.plugin.artifactCleanup.groovy'
2017-05-14 02:10:28,418 [Thread-5] [INFO ] (o.a.c.c.ConfigurationManagerImpl:352) - [Node ID: e82128d978aa01c3:-ae144a7:15c04b4f4d7:-8000] detected local modify for config 'artifactory.plugin.artifactCleanup.properties'
2017-05-14 02:10:28,434 [http-nio-8081-exec-10] [INFO ] (o.a.a.p.PluginsAddonDefaultImpl:110) - Reloading plugins
2017-05-14 02:10:28,436 [http-nio-8081-exec-10] [INFO ] (o.a.a.p.GroovyRunnerImpl:244) - Loading script from 'artifactCleanup.groovy'.
2017-05-14 02:10:28,596 [http-nio-8081-exec-10] [ERROR] (o.a.a.p.GroovyRunnerImpl:300) - Error loading script from '/opt/jfrog/artifactory/etc/plugins/artifactCleanup.groovy'.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/opt/jfrog/artifactory/etc/plugins/artifactCleanup.groovy: 19: unable to resolve class Field ,  unable to find class for annotation
 @ line 19, column 1.
   @Field final String PROPERTIES_FILE_PATH = "plugins/${this.class.name}.properties"
   ^

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) ~[groovy-all-2.4.5.jar:2.4.5]

getAndSetP2Url script function modifyP2Urls no longer works in Artifactory 4.0.2

Using Artifactory 4.0.2 and getAndSetP2Url.groovy, the "modifyP2Urls" REST API function returns the error:

{
  "errors" : [ {
    "status" : 500,
    "message" : "No signature of method: org.artifactory.descriptor.repo.VirtualRepoDescriptor.isP2Support() is applicable for argument types: () values: []"
  } ]
}%

If you comment out "repoDescriptor.isP2Support()" on line 103, the script works correctly. The private API must have changed.

securityReplication: Cannot distribute plugin using an admin API key

This is related to the securityReplication plugin.

When initially distributing the plugin, the API call to distSecRep must be done using the username and password of an admin user that is present on all instances. I had expected to be able to use an API key in the request, but that does not allow the plugin to propagate to other instances unless that exact same API key is present for the same user in the other instances.

Does not work:

$ curl -uadmin:<API_KEY> -XPOST http://localhost/artifactory/api/plugins/execute/distSecRep

Works as long as the admin user has a password of 'password' across all instances of the mesh:

$ curl -uadmin:<PLAINTEXT_PASSWORD> -XPOST http://localhost/artifactory/api/plugins/execute/distSecRep

Checksum plugin does not generate properties after a GET of the artifact

I installed checksum.groovy (into etc/plugins) and restarted Artifactory.

I then performed a GET of the artifact as follows:

$ curl -G -u alexcarr http://artifactory:8081/simple/ccc-release/com.copyright.calc/CalcJ/1.0.34/CalcJ.war -o CalcJ.war

I then checked the Metadata Tab of the artifact but I do not see any properties for the checksum. I've looked in both the Properties and XML Metadata sections of this tab.

Am I missing something here?

securityReplication plugin and Artifactory 5.x

Hi,

We have a setup of three Artifactory instances (5.1.4) and would like to replicate the security configuration with the securityReplication plugin.

When reloading the plugins we get the following error:

2017-03-23 14:31:01,304 [http-nio-8081-exec-40] [INFO ] (o.a.a.p.GroovyRunnerImpl:217) - Script 'securityReplication.groovy' has changed. Reloading all scripts
2017-03-23 14:31:01,376 [http-nio-8081-exec-40] [INFO ] (o.a.a.p.GroovyRunnerImpl:244) - Loading script from 'securityReplication.groovy'.
2017-03-23 14:31:02,598 [http-nio-8081-exec-40] [ERROR] (o.a.a.p.GroovyRunnerImpl:300) - Error loading script from '/var/opt/jfrog/artifactory/etc/plugins/securityReplication.groovy'.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/var/opt/jfrog/artifactory/etc/plugins/securityReplication.groovy: 39: unable to resolve class org.artifactory.security.crypto.CryptoHelper
 @ line 39, column 1.
   import org.artifactory.security.crypto.CryptoHelper

If we modify the import of CryptHelper to org.artifactory.common.crypto.CryptoHelper the plugin is loaded but we get a NullPointerException when the scheduled replication is executed:

2017-03-23 14:30:00,079 [art-exec-31] [ERROR] (securityReplication :340) - No goldenFile lets get the first goldenDB
2017-03-23 14:30:00,300 [art-exec-31] [ERROR] (o.q.c.JobRunShell   :211) - Job artifactory.PluginCommand#54a91e4f-1df2-4fc7-bef0-a0129b100195 threw an unhandled Exception: 
java.lang.NullPointerException: null
        at org.artifactory.common.crypto.CryptoHelper.hasMasterKey(CryptoHelper.java:109) ~[artifactory-config-5.1.4.jar:na]

Wrong curl example for cleanup/buildCleanup

The example REST call is
// curl -f -XPOST -u admin:password "http://localhost:8080/artifactory/api/plugins/execute/cleanBuilds?params=days=50&dryRun=1", but then dryRun=1 parameter does not get handled as expected.

The correct call seems to be // curl -f -XPOST -u admin:password "http://localhost:8080/artifactory/api/plugins/execute/cleanBuilds?params=days=50|dryRun=1" with a | pipe instead of ampersand

checksum plugin seems to have no effect

I dumped the checksum.groovy file into /etc and restarted, realized I'd made a mistake and then moved it into /etc/plugins and restated. Neither of these locations had any effects on the checksums I could see in the web UI. So, questions:

Should I see a new checksum in the web ui?
Is there someplace in artifactory I need to configure in order to actually generate the sha-256 checksum?

Incorrect example curl commands

Using this curl command taken from the README:

curl -X POST -v -u admin:password "http://localhost:8080/artifactory/api/plugins/execute/cleanup?params=months=1;repos=libs-release-local;dryRun;paceTimeMS=2000"

Results in the following being executed (from artifactory.log):

2017-08-07 12:50:00,562 [http-nio-8081-exec-9] [INFO ] (artifactCleanup :-2) - Starting artifact cleanup for repositories null, until 6 months ago with pacing interval 0 ms dryrun: false

Also, the example curl command given in artifactCleanup.groovy is different from the README:

curl -i -uadmin:password -X POST "http://localhost:8081/artifactory/api/plugins/execute/cleanup?params=months=1|repos=libs-release-local|dryRun=true|paceTimeMS=2000"

Most notably it contains pipes instead of semi-colons.

Artifactory Cleanup

From the below link we got an groovy script for artifactory clean up process.

https://github.com/JFrogDev/artifactory-user-plugins/blob/master/cleanup/artifactCleanup.groovy

But the above script takes "repos" input as a array string & not accepting * values.

So that if we try to fetch artifacts like "/libs-releases-local/com/testrepo*" it says not found. But there is the paths available as below.

/libs-releases-local/com/testrepo1
/libs-releases-local/com/testrepo2
/libs-releases-local/com/testrepo3

Cleanup aborts when maven metadata is missing.

When running dryRun=true, the cleanup lists the work it would do. When running without dryRun, if a project is missing a maven-metadata.xml (lets say from a failed deploy), the script will abort.

I can generate the metadata for an individual artifact by POSTing to /api/maven/calculateMetadata/..repoId../..groupId../..artifactId.. However, I wind up needing to do this for every artifact in a multimodule project to get the cleanup to work.

The groovy script: https://github.com/JFrogDev/artifactory-user-plugins/blob/master/cleanup/artifactCleanup/artifactCleanup.groovy

No execution plugins are loaded

Hello all.

I am a rookie on Artifactory and I need to use this plug in I already download and place it in etc/plugins

but when a execute
curl -X POST -v -u admin:password "http://localhost:8080/artifactory/api/plugins/execute/cleanup?params=months=1|repos=libs-release-local|dryRun|paceTimeMS=2000"

I get the following error

< HTTP/1.1 404 Not Found
< Server: nginx/1.12.0
< Date: Sun, 30 Jul 2017 15:37:21 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Artifactory-Id: f7568c9766388dfb:-45bda294:15d8f4bfc81:-8000
<
{
"errors" : [ {
"status" : 404,
"message" : "No execution plugins are loaded."
} ]

can someone help me ?

getAndSetP2Url script function modifyP2Urls does not update Included/Selected Repositories in Artifactory 4.0.2 (does not update P2 composite)

The list of URLs can be successfully queried and modified using getAndSetP2Url but it does not update the set of "Included or Selected Repositories". This also means that changes are not picked up when attempting to the use the Virtual P2 Repository in Eclipse.

Steps to reproduce:

  1. Create new Virtual P2 Repository
  2. Use "modifyP2Urls" REST API call to add a new URL
  3. Attempt to use Virtual P2 Repository URL in Eclipse to install new artifacts

Result:
In Eclipse: receive the error message "No repository found at "
In Artifactory Virtual Repositories admin page: Included Repositores = 0, Selected Repositories = "" (blank)

Notes:
If you open the new Virtual P2 Repository through the web admin page and click save, the Included and Selected Repositories are updated and the repository is now usable in Eclipse. This does make it kind of pointless to use the API though.

Gradle plugin generate unspecified dependency in POM file.

Hello,

I don't know whether or not this is the good, but the sounds the best one. If not please advise me where it should be posted and I will be glad to do as such.

So, in my build.gradle file I have the Artifactory plugin installed and working.
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.5.4'

When I run the following command generatePomFileForAarPublication it generates some unecessary dependency in the POM.xml file.

    <dependency>
      <groupId/>
      <artifactId>unspecified</artifactId>
      <version/>
    </dependency>

And then, when it is deployed to the Artifactory server, the version tagged with this POM file is unusable because of this. Removing it manually solved it, but as this task is always used before deployment...

Backend side, I can see this logs when Gradle client is trying to download artifacts but without any success client side.
[ACCEPTED DOWNLOAD] maven-metadata.xml

If you need anything from me, please let me know.

PS: Sorry, it was due to Dexguard annotation processor used with compiled instead of provided... my bad.

Use threads to improve buildSync.groovy performance

The buildSync.groovy script processes build files one at a time which can be very slow especially when populating new empty instances.

With threads the build sync can be done in parallel and can result in orders of magnitude performance improvement.

As an example our artifactory instance has 700,000 build entries which can take 7-10 days (168-240 hours) to process one build at a time. With a pool of 100 threads, the same instance was populated in less then 18 hours.

Would like to see artifactCleanup have a parameter to specify groupId

We are looking at implementing the artifactCleanup plugin in the near future, but not without an enhancement. It allows specifying the repo, but we need to limit the groupId as well. We are a global company with software groups in different parts of the globe working on different products. We want to cleanup our artifacts without impacting theirs. So we need to have groupId as another parameter.

conda plugin should create a noarch directory

I installed the conda user plugin.
I successfully deployed a conda package. I now have a linux-64 and osx-64 directory under the repository.
When I run a command with the artifactory channel, I get the following warning:

Fetching package metadata ....
WARNING: The remote server could not find the noarch directory for the
requested channel with url: https://artifactory.xxx.xxx:443/artifactory/ics-conda

It is possible you have given conda an invalid channel. Please double-check
your conda configuration using `conda config --show`.

If the requested url is in fact a valid conda channel, please request that the
channel administrator create `noarch/repodata.json` and associated
`noarch/repodata.json.bz2` files, even if `noarch/repodata.json` is empty.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json
.........

I tried creating manually the noarch directory and the repodata.json files but that resulted in the conda plugin to throw an exception. Full trace here:
https://gist.github.com/beenje/ac5342e9730f2bc7f386575978519542

I guess to avoid the warning I have to upload a noarch package. But it would be nice if the conda plugin would handle that itself.
Or am I missing something?

Conda plugin returns index errors with authentication

When attempting to search an artifactory conda channel with authentication, a CondaIndexError is returned.

Command:

conda search --override-channels --channel https://<user>:<API Key / Encrypted Pass>@<server>/artifactory/<repo>/<channel>

Response:

Loading channels: failed

CondaIndexError: Invalid index file: https://<user>:<API Key / Encrypted Pass>@<server>/artifactory/<repo>/<channel>/osx-64/repodata.json: encoding with 'idna' codec failed (UnicodeError: label empty or too long)

This error was originally returned for the noarch subdirectory, and that error was handled by creating the repodata.json as described in #161. After solving, it is now returned with the osx-64 repo as indicated above.

checksum plugin operates only on local repos

We have installed the checksum plugin on Artifactory Pro 2.6.6. It works as expected for GETs to local repos. But GETs to a virtual repo that includes the corresponding local repo return HTTP 500: Could not process download request: Script execution error..

I turned on DEBUG logging for the RepoFilter, and the root cause exeception indicates a requirement that the repo is a local repository. Is this intentional, or can the plugin be modified to function for virtual repos? Thanks.

Selective stack trace:

2013-04-08 09:19:16,174 [http-bio-8081-exec-162] [WARN ] (o.a.w.s.RepoFilter  :237) - Sending HTTP error code 500: Could not process download request: Script execution error..
java.lang.Throwable: null
    at org.artifactory.util.LoggingUtils.warnOrDebug(LoggingUtils.java:38) [artifactory-config-2.6.6.jar:na]
    at org.artifactory.util.LoggingUtils.warnOrDebug(LoggingUtils.java:32) [artifactory-config-2.6.6.jar:na]
    at org.artifactory.request.ArtifactoryResponseBase.sendError(ArtifactoryResponseBase.java:105) [artifactory-common-2.6.6.jar:na]
    at org.artifactory.webapp.servlet.RepoFilter.doDownload(RepoFilter.java:237) [artifactory-web-application-2.6.6.jar:na]
    at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:140) [artifactory-web-application-2.6.6.jar:na]
    at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:84) [artifactory-web-application-2.6.6.jar:na]
    ... omitted ...
2013-04-08 09:19:16,187 [http-bio-8081-exec-162] [DEBUG] (o.a.w.s.RepoFilter  :239) - Could not process download request: Script execution error.
java.lang.RuntimeException: Script execution error.
    at org.artifactory.addon.plugin.GroovyRunnerImpl.executePluginAction(GroovyRunnerImpl.java:250) [artifactory-addon-plugins-2.6.6.jar:na]
    at org.artifactory.addon.plugin.GroovyRunnerImpl.execPluginActions(GroovyRunnerImpl.java:96) [artifactory-addon-plugins-2.6.6.jar:na]
    ... omitted ...
Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.GeneratedMethodAccessor429.invoke(Unknown Source) [na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_33]
    at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_33]
    at org.artifactory.addon.plugin.GroovyRunnerImpl.executePluginAction(GroovyRunnerImpl.java:243) [artifactory-addon-plugins-2.6.6.jar:na]
    ... 51 common frames omitted
Caused by: java.lang.IllegalArgumentException: Repository rup-release is not a local repository
    at org.artifactory.repo.service.RepositoryServiceImpl.getLocalRepository(RepositoryServiceImpl.java:2121) [artifactory-core-2.6.6.jar:na]
    at org.artifactory.repo.service.RepositoryServiceImpl.getFsItem(RepositoryServiceImpl.java:2322) [artifactory-core-2.6.6.jar:na]
    at org.artifactory.repo.service.RepositoryServiceImpl.getMetadata(RepositoryServiceImpl.java:950) [artifactory-core-2.6.6.jar:na]
    ... omitted ...

Issue/Clarification Staging Plugin

I am running Artifactory 5.x, Cloudbees jenkins . I am using the staging plugin to do the release staging process. I am running into this weird issue and I am hoping somebody already ran across similar issue like mine. If I have a job in jenkins root folder , under All , staging plugin works like a champ , but if have a build job nested under folders , am getting illegal argument exception and get all builds call is empty and staging fails.

Any help would be appreciated.

integration of Artifactory with Bintray

in Artif v 4.12.2, configuring Distribution page, on the Rules page, if I create a new Generic rule and save the page, and then go back to look at it, the rule disappears. Generic rules do not get saved for some reason.

pic1
pic2

Issue running artifactoryCleanup plugin as cron job

This may be a user error, but i cannot run the artifactoryCleanup plug in as a cron job with the .properties file.

The plugin starts up at the time, but then fails to retrieve any artifacts. The search.aql returns no items in the list.

This works when i use the curl command and point it to execute the plugin, but it doesnt work with the cron job.

I am on Artifactory Version 4.16.1. I searched around for the last few hours and I could not find out how to run this correctly. Any help would be appreciated.

My log states this:

2017-12-01 14:08:00,020 [art-exec-5] [INFO ] (artifactCleanup :-2) - Policy settings for scheduled run at(0 08 14 ? * *): repo list([libs-releases-local,DPE,libs-release-prod]), months(6), paceTimeMS(0) dryrun(false) disablePropertiesSupport(false)
2017-12-01 14:08:00,033 [art-exec-5] [INFO ] (artifactCleanup :-2) - Starting artifact cleanup for repositories [libs-releases-local,DPE,libs-release-prod], until 6 months ago with pacing interval 0 ms, dryrun: false, disablePropertiesSupport: false
2017-12-01 14:08:00,217 [art-exec-5] [INFO ] (artifactCleanup :212) - Elapsed time to retrieve paths to skip: 0.166 seconds
2017-12-01 14:08:00,262 [art-exec-5] [INFO ] (artifactCleanup :-2) - Finished cleanup, deleted 0 artifacts that took up 0 bytes

Thanks.
Mike

License For buildSync plugin? Other plugins?

What license are these plugins published under? I don't see license info listed anywhere.

I've gone ahead and put a placeholder under the build/buildSync plugin documentation for this, but we should really include a LICENSE file for each project where we can.

If a license hasn't been decided, can I recommend Apache 2.0?

artifactCleanup user plugin issue

Does not seem to do what it states.

We confirmed via request and access logs in artifactory that several artifacts were utilized in a build in mid November 2017. The artifacts were deleted in January 2018 by the artifactCleanup user plugin, also confirmed in the artifactory logs.

Our artifact cleanup cronjob passes in a 36 month parameter to the artifactCleanup script, and based off the description of this user plugin, it should be filtering out any artifact downloaded within the past 36 months.

Apparently it is not doing what it states.

cleanup/artifactCleanup: 'cleanup.skip' property support

Hello,

To control the growth of Artifactory storage in the time, the cleanup plugin is very useful.

But the policy of clean could depend of artifacts, some of one should not be deleted even if not downloaded since some months (legal archive of code produced, old company framework version used less once by year, ...).

It could be useful to support a cleanup.skip Artifactory property, who disable the delete when found on artifact.
In this case any users have autonomy to participe to artifacts deletion in autonomy on their artifacts (depending permissions).


Currently in Artifactory, when a property is setted Recursive, it is applied on current childrens BUT NOT on new childrens artifacts deployed after this property configuration.
=> Perhaps parent paths should be checked to verify the presence of this property.


This property check process (based on REST api ?) could perhaps extend the global cleanup process time => a properties.support= true in artifactCleanup.properties would be a good idea.


I know that user plugins are not under JFrog maintenance ; this issue is a personnal reminder or for a motivated user (^^), and for sharing the idea/specification.

NB: It could be a partial answer for #114.

Best regards

buildSync plugin: Compile errors when starting plugin

I followed the setup instructions for installing buildSync plugin in Readme.md, but I get compile errors when starting artifactory.

file:/D:/artifactory-pro-4.7.6/etc/plugins/buildSync.groovy: 18: unable to resolve class groovyx.net.http.HTTPBuilder
@ line 18, column 1.
import groovyx.net.http.HTTPBuilder
^
...

I added lines

@Grapes([
    @Grab(group = 'org.codehaus.groovy.modules.http-builder',
          module = 'http-builder', version = '0.7.2')
])

(inspired by setup.groovy) above import section and everything works fine.

Cleanup enhancements

In our very large Artifactory instance, the artifactCleanup script hammered the disk too much. I added optional pacing controls, and operational controls to pause, resume, stop, or adjust the pacing value.

In addition, the current script only supports one policy for the entire Artifactory instance. I added support for multiple policies.

These changes are submitted in PR #45

artifactCleanup cleaning all the other repos to

I had trouble with our automatic artifactCleanup process.
We have a Jenkins job to submit the cleaning through a curl command.
It wasn't working anymore. I found out that the field seperator has changed!? It was | and nou ;
( but that was a change for 5.x !? )

I submitted a single repo clean from the command line:
curl -X POST -v -u admin:xxxxxx "http://ota-artifactory1.so.kadaster.nl:8090/artifactory/api/plugins/execute/cleanup?params=months=2;repos=mvn-snapshot-local;paceTimeMS=200"

In the artifactory logging I saw that many other repo's were allso cleaned ???
How is that possible.

I was happy to know artifactory has a trash can. So I could place the deleted artifacts from the other repo's back in place.

We are running artifactory 4.16.1

The message I get back in the artifactory log is:

2017-08-09 18:29:21,522 [http-nio-8081-exec-6767] [INFO ] (artifactCleanup :90) - Starting artifact cleanup for repositories null, until 6 months ago with pacing interval 0 ms dryrun: false

remoteBackup.groovy not working for root level artifacts

Artifacts sitting at the root of a repository aren't handled properly by remoteBackup.groovy. Here is the error that I get:

2017-07-13 13:15:06,766 [http-nio-8081-exec-2] [WARN ] (remoteBackup        :97) - Unable to backup tpp-packages-remote-cache:./asicd.linux to tpp-packages: Path element cannot end with a dot: tpp-packages/./asicd.linux
2017-07-13 13:15:06,772 [http-nio-8081-exec-2] [WARN ] (remoteBackup        :97) - Unable to backup tpp-packages-remote-cache:./barefoot-sde-4.1.0.11.tar to tpp-packages: Path element cannot end with a dot: tpp-packages/./barefoot-sde-4.1.0.11.tar

artifactoryCleanup stops working on SSL only Artifactory

Hi,
we moved to a new artifactory instance that is accessible ssl only and i wanted to use artifactoryCleanup Script as usual. Unfortonately it stopped working.

i get an 301 Moved permanently:

  • Trying ...
  • Connected to () port 80 (#0)
  • Server auth using Basic with user 'admin'

POST /artifactory/api/plugins/execute/cleanup?params=months=1|repos=repo-snapshot-local||paceTimeMS=500 HTTP/1.1
Host:
Authorization: Basic APIKEY
User-Agent: curl/7.49.1
Accept: /

< HTTP/1.1 301 Moved Permanently
< Date: Wed, 11 Oct 2017 12:13:07 GMT
< Server: Apache
< Location: https://:443/artifactory/api/plugins/execute/cleanup?params=months=1|repos=repo-snapshot-local||paceTimeMS=500
< Content-Length: 334
< Content-Type: text/html; charset=iso-8859-1

I also tried that deleteEmptyFolders Plugin - it works like expected. What is special about cleanup plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.