Skip to content

cnenning/go-artifactory-scm-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-artifactory-scm-plugin

Started as SCM-Plugin for go. In meantime a Package-Repository-Plugin is provided, too.

The SCM-Plugin treats a directory in Artifactory as a SCM repository. That allows to choose which version of an artifact shall be deployed by go. With Package-Repository-Plugin you can just deploy latest version.

Installation

Place the JAR file(s) in directory plugins/external of your go-server. See go documentation for more details.

Plugin Configuration

go shows a cogwheel next to each plugin in admin area. You can configure some global settings like timeouts or username/password there. Afterwards you have to restart go-server. You can check if your config is active by looking at logs. See go docs for details.

SCM Configuration

Repositories in Artifactory should follow this pattern:

/some/dir/to/app/${VERSION}/${FILES}

When configuring a material inside go you should provide the URL up to app/.

${VERSION} should be sub-directories which are treated as SCM revisions.

On checkout all files in the ${VERSION} sub-dir are downloaded. Optionally you can define a regex to download just some files.

SCM Usage

screenshot of material config

After a pipeline has been created you can add an Artifactory SCM material.

Package Configuration

go demands a Package-Repository definition in admin section. You can specify a common base URL for your artifacts there.

For pipeline materials you have to provide a path and filename regex to uniquely identify an artifact.

Package-Repository-Plugins cannot download files themselfs but provide variables to be used in custom scripts. This plugin provides filename and complete URL (location) of found artifact. Both 'as is' and with URL encoded filename.

You may use groups in regex to extract version number. E.g. a filename foo_1.2.3.ext may be matched with regex (foo_)(.*)(\.ext). Each group is provided as variable.