1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2019 Nordix Foundation.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
19 #-------------------------------------------------------------------------------
20 # Macros are used to avoid hitting parameter expansion of curly brackets and
21 # the need to using include-raw-escape
22 #-------------------------------------------------------------------------------
25 # Parameters used for setting multiple Gerrit Projects on Nordix
26 # Required for cases where source repositories depend on each other to build
27 # e.g. sdc-customization depends on sdc repo
29 name: multi-project-parameters
34 description: JJB configured PROJECTS parameter to identify Nordix Gerrit projects (e.g. onap/sdc local/onap/uds/sdc-customization)
38 description: "JJB configured BRANCHES parameter (e.g. 20.1 master)"
40 name: PROJECT_DIRECTORIES
41 default: '{project_directories}'
42 description: Directory names to place PROJECTS (e.g. sdc sdc-customization)
44 name: PROJECT_VERSIONS
45 default: '{project_versions}'
46 description: Commit ids of PROJECTS source to checkout e.g. 6d3ab d96ba Allows for building from specific versions of a source or can also be left blank to pull latest source.
53 default: https://gerrit.nordix.org/
54 description: Base HTTPS URL of repository to clone from
57 name: maven-parameters
61 default: '{mvn_version}'
62 description: Maven version to build with
65 default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-$MVN_VERSION-bin.zip
66 description: Download URL for Maven
69 default: $WORKSPACE/apache-maven-$MVN_VERSION/bin/mvn
70 description: Path to mvn executable
73 default: '{mvn_params}'
74 description: Maven build parameters
76 name: MVN_SETTINGS_XML_VERSION
77 default: '{mvn_settings_xml_version}'
78 description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
81 name: artifactory-parameters
85 default: "https://artifactory.nordix.org/artifactory"
86 description: Artifactory URL to push to
88 # Parameters for source repository artifacts
90 name: repo-archive-parameters
94 default: '{pom_location}'
95 description: Path to repository pom.xml parsed for version number used within archive filenames
98 default: '{grep_parameters}'
99 description: Parameters for grep command used for parsing pom file for version number used within archive filenames
102 default: '{archive_name}'
103 description: Name to be given to archive holding the repositories pushed to Artifactory
105 name: ARTIFACTORY_REPO_ARCHIVE_PATH
106 default: '{artifactory_repo_archive_path}'
107 description: Artifactory repository and path to push repository archive to
109 name: REPO_ARCHIVE_ARTIFACT_DIRECTORY
110 default: '{repo_archive_artifact_directory}'
111 description: Workspace directory to hold repository artifacts
114 # Parameters regarding docker image artifacts
116 name: docker-archive-parameters
120 default: '{docker_images}'
121 description: Docker image names to archive and push to Artifactory
123 name: ARTIFACTORY_DOCKER_IMAGES_PATH
124 default: '{artifactory_docker_images_path}'
125 description: Artifactory repository and path to push docker images to
127 name: DOCKER_IMAGE_ARTIFACT_DIRECTORY
128 default: '{docker_image_artifact_directory}'
129 description: Workspace directory to hold docker image artifacts
131 # Parameters regarding file artifacts (.war, .jar files etc)
133 name: artifact_parameters
137 default: '{artifact_paths}'
138 description: Artifact file paths that should be pushed to Artifactory, can contain wildcards e.g. PROJECTDIRECTORY/some/path/catalog-be-*.war
140 name: ARTIFACTORY_ARTIFACT_PATH
141 default: '{artifactory_artifact_path}'
142 description: Artifactory repository and path to push artifacts to e.g. .war .jar files
144 name: ARTIFACT_DIRECTORY
145 default: '{artifact_directory}'
146 description: Workspace directory to hold artifacts
149 # Builders for maven builds
151 name: 'generate-build-metadata'
154 !include-raw: ./scripts/generate-build-metadata.sh
157 name: 'pull-source-repositories'
160 !include-raw: ./scripts/pull-repos.sh
163 name: 'maven-build-repositories'
166 !include-raw: ./scripts/maven-build.sh
169 name: 'maven-clean-repositories'
172 !include-raw: ./scripts/maven-clean.sh
174 # Builders for packaging artifacts (.war .jar, docker images and source repositories)
176 name: 'collect-file-artifacts'
179 !include-raw: ./scripts/collect-artifacts.sh
182 name: 'package-docker-images'
185 !include-raw: ./scripts/archive-images.sh
188 name: 'package-source-repositories'
191 !include-raw: ./scripts/archive-repos.sh
193 # Builders for promoting/pushing artifacts (.war, .jar, docker images and source repositories) to Artifactory
195 name: 'promote-file-artifacts-to-artifactory'
198 !include-raw: ./scripts/push-artifacts.sh
201 name: 'promote-docker-images-to-artifactory'
204 !include-raw: ./scripts/push-images.sh
207 name: 'promote-source-repositories-to-artifactory'
210 !include-raw: ./scripts/push-repos.sh
212 # Wrapper for Artifactory API Key
214 name: 'artifactory-credentials'
216 - credentials-binding:
217 - username-password-separated:
218 credential-id: 'nordix-cicd-arm-credentials'
219 username: NORDIX_ARM_USERNAME
220 password: NORDIX_ARM_TOKEN