mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
3c41788405
* using default java truststore * default java keytore * remove trust store * working directory * change dir java_home * env variable * trying to find jre home * changing directory to jre home and java home * trying java jre * remving $ * trying to search the cacerts * copying existing cacerts * removing change directory * searching for secrutiy folder only * searching cacerts * new path for cacert * path to ca-cert * new trust store * changing cacert location * only adding maven_opts env variable once * log message * ca cert path from user * handelling interface modification * enhance logs and code clean up * code clean up Co-authored-by: Your Name <you@example.com> Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
184 lines
7.2 KiB
YAML
184 lines
7.2 KiB
YAML
metadata:
|
|
name: mavenBuild
|
|
aliases:
|
|
- name: mavenExecute
|
|
deprecated: false
|
|
description: This step will install the maven project into the local maven repository.
|
|
longDescription: |
|
|
This step will install the maven project into the local maven repository.
|
|
It will also prepare jacoco to record the code coverage and
|
|
supports ci friendly versioning by flattening the pom before installing.
|
|
spec:
|
|
inputs:
|
|
secrets:
|
|
- name: altDeploymentRepositoryPasswordId
|
|
description: Jenkins credentials ID containing the artifact deployment repository password.
|
|
type: jenkins
|
|
params:
|
|
- name: pomPath
|
|
type: string
|
|
description: Path to the pom file which should be installed including all children.
|
|
scope:
|
|
- PARAMETERS
|
|
- STEPS
|
|
mandatory: false
|
|
default: pom.xml
|
|
- name: profiles
|
|
type: "[]string"
|
|
description: Defines list of maven build profiles to be used.
|
|
scope:
|
|
- PARAMETERS
|
|
- GENERAL
|
|
- STAGES
|
|
- STEPS
|
|
- name: flatten
|
|
type: bool
|
|
description: Defines if the pom files should be flattened to support ci friendly maven versioning.
|
|
scope:
|
|
- PARAMETERS
|
|
default: true
|
|
- name: verify
|
|
type: bool
|
|
description: Instead of installing the artifact only the verify lifecycle phase is executed.
|
|
scope:
|
|
- PARAMETERS
|
|
default: false
|
|
|
|
# Global maven settings, should be added to all maven steps
|
|
- name: projectSettingsFile
|
|
type: string
|
|
description: Path to the mvn settings file that should be used as project settings file.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
aliases:
|
|
- name: maven/projectSettingsFile
|
|
- name: globalSettingsFile
|
|
type: string
|
|
description: Path to the mvn settings file that should be used as global settings file.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
aliases:
|
|
- name: maven/globalSettingsFile
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/mavenGlobalSettingsFile
|
|
- name: m2Path
|
|
type: string
|
|
description: Path to the location of the local repository that should be used.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
aliases:
|
|
- name: maven/m2Path
|
|
- name: logSuccessfulMavenTransfers
|
|
type: bool
|
|
description: Configures maven to log successful downloads. This is set to `false` by default to reduce the noise in build logs.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
aliases:
|
|
- name: maven/logSuccessfulMavenTransfers
|
|
- name: createBOM
|
|
type: bool
|
|
description: Creates the bill of materials (BOM) using CycloneDX Maven plugin.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
aliases:
|
|
- name: maven/createBOM
|
|
- name: altDeploymentRepositoryPassword
|
|
type: string
|
|
description: Password for the alternative deployment repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ). This password will be updated in settings.xml . When no settings.xml is provided a new one is created corresponding with <servers> tag
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
secret: true
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryPassword
|
|
- name: altDeploymentRepositoryPasswordId
|
|
type: secret
|
|
- type: vaultSecretFile
|
|
paths:
|
|
- $(vaultPath)/alt-deployment-repository-passowrd
|
|
- $(vaultBasePath)/$(vaultPipelineName)/alt-deployment-repository-passowrd
|
|
- $(vaultBasePath)/GROUP-SECRETS/alt-deployment-repository-passowrd
|
|
- name: altDeploymentRepositoryUser
|
|
type: string
|
|
description: User for the alternative deployment repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ). This user will be updated in settings.xml . When no settings.xml is provided a new one is created corresponding with <servers> tag
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUsername
|
|
- name: altDeploymentRepositoryUrl
|
|
type: string
|
|
description: Url for the alternative deployment repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ). This Url will be updated in settings.xml . When no settings.xml is provided a new one is created corresponding with <servers> tag
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUrl
|
|
- name: altDeploymentRepositoryID
|
|
type: string
|
|
description: Id for the alternative deployment repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ). This id will be updated in settings.xml and will be used as a flag with DaltDeploymentRepository along with mavenAltDeploymentRepositoryUrl during maven deploy . When no settings.xml is provided a new one is created corresponding with <servers> tag
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryId
|
|
- name: customTlsCertificateLinks
|
|
type: "[]string"
|
|
description: "List of download links to custom TLS certificates. This is required to ensure trusted connections to instances with repositories (like nexus) when publish flag is set to true."
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
- name: publish
|
|
type: bool
|
|
description: Configures maven to run the deploy plugin to publish artifacts to a repository.
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
aliases:
|
|
- name: maven/publish
|
|
- name: javaCaCertFilePath
|
|
type: string
|
|
description: path to the cacerts file used by Java. When maven publish is set to True and customTlsCertificateLinks (to deploy the artifact to a repository with a self signed cert) are provided to trust the self signed certs, Piper will extend the existing Java cacerts to include the new self signed certs. if not provided Piper will search for the cacerts in $JAVA_HOME/jre/lib/security/cacerts
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
aliases:
|
|
- name: maven/javaCaCertFilePath
|
|
containers:
|
|
- name: mvn
|
|
image: maven:3.6-jdk-8
|