2020-03-20 19:20:52 +02:00
metadata :
name : nexusUpload
aliases :
- name : mavenExecute
deprecated : false
2020-04-11 12:56:44 +02:00
description : Upload artifacts to Nexus Repository Manager
2020-03-20 19:20:52 +02:00
longDescription : |
2020-04-11 12:56:44 +02:00
Upload build artifacts to a Nexus Repository Manager.
Supports MTA, npm and (multi-module) Maven projects.
MTA files will be uploaded to a Maven repository.
The uploaded file-type depends on your project structure and step configuration.
To upload Maven projects, you need a pom.xml in the project root and set the mavenRepository option.
To upload MTA projects, you need a mta.yaml in the project root and set the mavenRepository option.
To upload npm projects, you need a package.json in the project root and set the npmRepository option.
2021-03-10 16:06:42 +02:00
If the 'format' option is set, the 'URL' can contain the full path including the repository ID. Providing the 'npmRepository' or the 'mavenRepository' parameter(s) is not necessary.
2020-04-11 12:56:44 +02:00
npm :
Publishing npm projects makes use of npm's "publish" command.
It requires a "package.json" file in the project's root directory which has "version" set and is not delared as "private".
To find out what will be published, run "npm publish --dry-run" in the project's root folder.
It will use your gitignore file to exclude the mached files from publishing.
Note : npm's gitignore parser might yield different results from your git client, to ignore a "foo" directory globally use the glob pattern "**/foo".
If an image for mavenExecute is configured, and npm packages are to be published, the image must have npm installed.
2020-03-20 19:20:52 +02:00
spec :
inputs :
secrets :
- name : nexusCredentialsId
2020-09-23 13:22:51 +02:00
description : Jenkins 'Username with password' credentials ID containing the technical username/password credential for accessing the nexus endpoint.
2020-03-20 19:20:52 +02:00
type : jenkins
2020-03-31 15:16:18 +02:00
aliases :
- name : nexus/credentialsId
2020-03-20 19:20:52 +02:00
params :
- name : version
type : string
description : The Nexus Repository Manager version. Currently supported are 'nexus2' and 'nexus3'.
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2020-03-20 19:20:52 +02:00
default : nexus3
2020-04-03 21:32:38 +02:00
possibleValues :
- nexus2
- nexus3
2020-03-31 15:16:18 +02:00
aliases :
- name : nexus/version
2021-03-10 16:06:42 +02:00
- name : format
type : string
description : The format/registry type. Currently supported are 'maven' and 'npm'.
scope :
- PARAMETERS
- STAGES
- STEPS
possibleValues :
- maven
- npm
resourceRef :
- name : commonPipelineEnvironment
param : custom/repositoryFormat
2021-10-01 12:49:05 +02:00
default : maven
2020-03-20 19:20:52 +02:00
- name : url
type : string
2021-03-10 16:06:42 +02:00
description : URL of the nexus. The scheme part of the URL will not be considered, because only http is supported. If the 'format' option is set, the 'URL' can contain the full path including the repository ID and providing the 'npmRepository' or the 'mavenRepository' parameter(s) is not necessary.
2020-03-20 19:20:52 +02:00
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2020-03-20 19:20:52 +02:00
mandatory : true
2020-03-31 15:16:18 +02:00
aliases :
- name : nexus/url
2021-03-10 16:06:42 +02:00
resourceRef :
- name : commonPipelineEnvironment
param : custom/repositoryUrl
2020-04-11 12:56:44 +02:00
- name : mavenRepository
2020-03-20 19:20:52 +02:00
type : string
2020-04-11 12:56:44 +02:00
description : Name of the nexus repository for Maven and MTA deployments. If this is not provided, Maven and MTA deployment is implicitly disabled.
2020-03-20 19:20:52 +02:00
scope :
2020-04-11 12:56:44 +02:00
- PARAMETERS
- STAGES
- STEPS
2020-03-31 15:16:18 +02:00
aliases :
2020-04-11 12:56:44 +02:00
- name : nexus/mavenRepository
2020-03-31 15:16:18 +02:00
- name : nexus/repository
2020-04-11 12:56:44 +02:00
deprecated : true
- name : npmRepository
type : string
description : Name of the nexus repository for npm deployments. If this is not provided, npm deployment is implicitly disabled.
scope :
- PARAMETERS
- STAGES
- STEPS
aliases :
- name : nexus/npmRepository
2020-03-20 19:20:52 +02:00
- name : groupId
type : string
description : Group ID of the artifacts. Only used in MTA projects, ignored for Maven.
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2020-03-31 15:16:18 +02:00
aliases :
- name : nexus/groupId
2020-03-20 19:20:52 +02:00
- name : artifactId
type : string
description : The artifact ID used for both the .mtar and mta.yaml files deployed for MTA projects, ignored for Maven.
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
2020-03-20 19:20:52 +02:00
- name : globalSettingsFile
type : string
description : Path to the mvn settings file that should be used as global settings file.
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
aliases :
- name : maven/globalSettingsFile
- name : m2Path
type : string
description : The path to the local .m2 directory, only used for Maven projects.
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
aliases :
- name : maven/m2Path
2020-09-16 11:33:03 +02:00
- name : username
2020-03-20 19:20:52 +02:00
type : string
2020-04-03 21:32:38 +02:00
description : Username for accessing the Nexus endpoint.
2020-03-20 19:20:52 +02:00
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
2020-04-16 14:37:45 +02:00
secret : true
2020-08-28 15:38:15 +02:00
resourceRef :
- name : nexusCredentialsId
type : secret
param : username
2021-03-10 16:06:42 +02:00
- name : commonPipelineEnvironment
param : custom/repositoryUsername
2020-03-20 19:20:52 +02:00
- name : password
type : string
2020-04-03 21:32:38 +02:00
description : Password for accessing the Nexus endpoint.
2020-03-20 19:20:52 +02:00
scope :
2020-08-31 16:10:28 +02:00
- PARAMETERS
2020-04-16 14:37:45 +02:00
secret : true
2020-08-28 15:38:15 +02:00
resourceRef :
- name : nexusCredentialsId
type : secret
param : password
2021-03-10 16:06:42 +02:00
- name : commonPipelineEnvironment
param : custom/repositoryPassword
2020-11-11 17:32:23 +02:00
resources :
- name : buildDescriptor
type : stash
- name : buildResult
type : stash
2020-03-20 19:20:52 +02:00
containers :
2020-04-11 12:56:44 +02:00
# To allow both maven and mta we require an image that contains both tools. If the user configures an image for mavenExecute that also needs to contain both.
- name : mvn-npm
2021-11-15 15:04:16 +02:00
image : devxci/mbtci-java11-node14