Skip to content

Commit

Permalink
Added support for upload execution point in gdsl
Browse files Browse the repository at this point in the history
  • Loading branch information
bhanurp committed May 16, 2024
1 parent b5d4686 commit 592d96b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ArtifactoryUserPlugins.gdsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contributor(context(scriptScope())) {
property name: 'ctx', type: 'org.artifactory.spring.InternalArtifactoryContext', doc: 'Internal Artifactory context'

// plugin types
method name: 'upload', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: 'A section for handling and manipulating upload events'
method name: 'download', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: 'A section for handling and manipulating download events'
method name: 'storage', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: 'A section for handling and manipulating storage events'
method name: 'jobs', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: '''A section for defining scheduled jobs.<p>
Expand Down Expand Up @@ -88,6 +89,17 @@ contributor(context(scope: closureScope()), {

method name: 'beforeDownload', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: 'Handle before local download events.'
}
if (enclosingCall('upload')) {
method name: 'beforeUploadRequest', type: 'void', params: [closure: 'groovy.lang.Closure'], doc: '''Handle before any upload events, at this point the request passed all of Artifactory's filters (authentication etc) and is about to reach the
repositories.<p>
Context variables:
modifiedRepoPath (org.artifactory.repo.RepoPath)
Forces Artifactory to store the file at the specified repository path.
<p>Closure parameters:
request (org.artifactory.request.Request) - a read-only parameter of the request.
repoPath (org.artifactory.repo.RepoPath) - a read-only parameter of the request RepoPath (containing the repository the resource should be at).'''

}
if (enclosingCall('altRemotePath')) {
property name: 'path', type: 'java.lang.String', doc: 'the new path value. Defaults to the original RepoPath\'s path.'
}
Expand Down

0 comments on commit 592d96b

Please sign in to comment.