Summary
Publishes an artifact version to an artifact repository.
This API wraps the publish function in the ElectricCommander::ArtifactManagement
Perl module and hides some additional functionality implemented in that module.
You must specify an artifactName or a groupId with an artifactKey.
artifactNameStringoptionalThe name of an artifact. artifactKeyStringoptionalUser-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. compressBooleanoptionaldependentArtifactVersionsArrayoptionalOne or more artifact version queries. The most current match of each query is retrieved when the primary artifact is retrieved. Dependent artifact version query strings are in this form: <groupId>:<artifactKey>:<versionRange> ( versionRange is optional). The version range syntax is standard number interval notation. () marks exclusive ranges and [] marks inclusive ranges.descriptionStringoptionalA plain text or HTML description for this object. If using HTML, you must surround your text with <html> … </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul> .excludePatternsArrayoptionalSemicolon delimited list of file-path patterns indicating which files/directories under "fromDirectory" to exclude when publishing an artifact version. Defaults to "empty," which means no files are excluded.followSymlinksBooleanoptionalDefault is "true". If true, follow symbolic links and record the target file contents with the symbolic link name in the artifact. If false, record the symbolic link as a symbolic link. Following symbolic links causes the publishing API to remain compatible with previous releases. fromDirectoryStringoptionalThe directory containing files to publish as the artifact version. A subset of files can be published based on includePatterns and excludePatterns .groupIdStringoptionalA user-generated group name for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. includePatternsArrayoptionalSemicolon delimited list of file-path patterns indicating which files/directories under "fromDirectory" to publish in the artifact version. Defaults to "empty," which means all files will be included. Conversely, if only two files are "included," no other files except those two will be included.repositoryNameStringoptionalThe name of the artifact repository where you want to publish. versionStringoptionalUnique identifier for the artifact version in the form: If a version argument is provided, but does not follow the above format, the version will be considered |
Usage
Perl
$cmdr->publishArtifactVersion( # optionals );
ectool
ectool publishArtifactVersion \ # optionals
Examples
Version number examples
User input |
Interpretation |
||
Major.Minor.Patch |
Qualifier |
Build Number |
|
1 |
1.0.0 |
0 |
|
1.0 |
1.0.0 |
0 |
|
1.0-frank |
1.0.0 |
frank |
0 |
1.0-36 |
1.0.0 |
36 |
|
1.0-frank-36 |
1.0.0 |
frank |
36 |
Pattern syntax
Include / exclude
patterns are expressed as relative paths under the fromDirectory
. Pattern syntax and behavior is the same as Ant and uses the following wildcard specifiers:
-
?
— matches a single character. -
\*
— matches any number of characters, but only at a single directory level. -
*\*
— matches any number of directory levels.
For example:
-
Use
\*.txt
to match any.txt
file in the top-level directory. -
Use
*/\*.txt
to match any.txt
file in any child directory. -
Use
*\*/\*.txt
to match any.txt
file at any level.
Perl
# Add version 1.0.0-55 for artifact myGroup:myKey with a dependency on cmdr:SDK:1.2.0, # and the most current version of core:infra that is greater than or equal to 2.1.0. # Note: In the Perl API, the argument must be specified as singular even though it # can take multiple values. $cmdr->publishArtifactVersion({artifactName => "myGroup:myKey", version => "1.0.0-55", dependentArtifactVersion => ["cmdr:SDK:1.2.0", "core:infra:{2.1,]"]});