github.com/jaylevin/jenkins-library@v1.230.4/resources/metadata/nexusUpload.yaml (about) 1 metadata: 2 name: nexusUpload 3 aliases: 4 - name: mavenExecute 5 deprecated: false 6 description: Upload artifacts to Nexus Repository Manager 7 longDescription: | 8 Upload build artifacts to a Nexus Repository Manager. 9 10 Supports MTA, npm and (multi-module) Maven projects. 11 MTA files will be uploaded to a Maven repository. 12 13 The uploaded file-type depends on your project structure and step configuration. 14 To upload Maven projects, you need a pom.xml in the project root and set the mavenRepository option. 15 To upload MTA projects, you need a mta.yaml in the project root and set the mavenRepository option. 16 To upload npm projects, you need a package.json in the project root and set the npmRepository option. 17 18 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. 19 20 npm: 21 Publishing npm projects makes use of npm's "publish" command. 22 It requires a "package.json" file in the project's root directory which has "version" set and is not delared as "private". 23 To find out what will be published, run "npm publish --dry-run" in the project's root folder. 24 It will use your gitignore file to exclude the mached files from publishing. 25 Note: npm's gitignore parser might yield different results from your git client, to ignore a "foo" directory globally use the glob pattern "**/foo". 26 27 If an image for mavenExecute is configured, and npm packages are to be published, the image must have npm installed. 28 spec: 29 inputs: 30 secrets: 31 - name: nexusCredentialsId 32 description: Jenkins 'Username with password' credentials ID containing the technical username/password credential for accessing the nexus endpoint. 33 type: jenkins 34 aliases: 35 - name: nexus/credentialsId 36 params: 37 - name: version 38 type: string 39 description: The Nexus Repository Manager version. Currently supported are 'nexus2' and 'nexus3'. 40 scope: 41 - PARAMETERS 42 - STAGES 43 - STEPS 44 default: nexus3 45 possibleValues: 46 - nexus2 47 - nexus3 48 aliases: 49 - name: nexus/version 50 - name: format 51 type: string 52 description: The format/registry type. Currently supported are 'maven' and 'npm'. 53 scope: 54 - PARAMETERS 55 - STAGES 56 - STEPS 57 possibleValues: 58 - maven 59 - npm 60 resourceRef: 61 - name: commonPipelineEnvironment 62 param: custom/repositoryFormat 63 default: maven 64 - name: url 65 type: string 66 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. 67 scope: 68 - PARAMETERS 69 - STAGES 70 - STEPS 71 mandatory: true 72 aliases: 73 - name: nexus/url 74 resourceRef: 75 - name: commonPipelineEnvironment 76 param: custom/repositoryUrl 77 - name: mavenRepository 78 type: string 79 description: Name of the nexus repository for Maven and MTA deployments. If this is not provided, Maven and MTA deployment is implicitly disabled. 80 scope: 81 - PARAMETERS 82 - STAGES 83 - STEPS 84 aliases: 85 - name: nexus/mavenRepository 86 - name: nexus/repository 87 deprecated: true 88 - name: npmRepository 89 type: string 90 description: Name of the nexus repository for npm deployments. If this is not provided, npm deployment is implicitly disabled. 91 scope: 92 - PARAMETERS 93 - STAGES 94 - STEPS 95 aliases: 96 - name: nexus/npmRepository 97 - name: groupId 98 type: string 99 description: Group ID of the artifacts. Only used in MTA projects, ignored for Maven. 100 scope: 101 - PARAMETERS 102 - STAGES 103 - STEPS 104 aliases: 105 - name: nexus/groupId 106 - name: artifactId 107 type: string 108 description: The artifact ID used for both the .mtar and mta.yaml files deployed for MTA projects, ignored for Maven. 109 scope: 110 - PARAMETERS 111 - name: globalSettingsFile 112 type: string 113 description: Path to the mvn settings file that should be used as global settings file. 114 scope: 115 - GENERAL 116 - PARAMETERS 117 - STAGES 118 - STEPS 119 aliases: 120 - name: maven/globalSettingsFile 121 - name: m2Path 122 type: string 123 description: The path to the local .m2 directory, only used for Maven projects. 124 scope: 125 - GENERAL 126 - PARAMETERS 127 - STAGES 128 - STEPS 129 aliases: 130 - name: maven/m2Path 131 - name: username 132 type: string 133 description: Username for accessing the Nexus endpoint. 134 scope: 135 - PARAMETERS 136 secret: true 137 resourceRef: 138 - name: nexusCredentialsId 139 type: secret 140 param: username 141 - name: commonPipelineEnvironment 142 param: custom/repositoryUsername 143 - name: password 144 type: string 145 description: Password for accessing the Nexus endpoint. 146 scope: 147 - PARAMETERS 148 secret: true 149 resourceRef: 150 - name: nexusCredentialsId 151 type: secret 152 param: password 153 - name: commonPipelineEnvironment 154 param: custom/repositoryPassword 155 resources: 156 - name: buildDescriptor 157 type: stash 158 - name: buildResult 159 type: stash 160 containers: 161 # 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. 162 - name: mvn-npm 163 image: devxci/mbtci-java11-node14