mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
3cad6ac2cd
* WIP: Adapt bom names * + WIP: Adapt bom filenames * Upgrade cyclonedx gradle plugin and use cyclonedxBom config parameters * Fix unit tests - use correct name in bom creation * Fix pythonBuild bom name * introduce and use npmBomFilename const * Introduce and use mvnBomFilename const * Introduce and use gradleBomFilename const * Use build-tool names for bom suffix * + Adapt tests (build tool suffix) * Use BOM schema version 1.2 in gradleExecuteBuild * Pin version of cyclonedx-maven-plugin to 2.7.1 * Adapt generated files * Fix integration tests * Fix integration tests * Fix gradle build integration tests Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
128 lines
3.6 KiB
YAML
128 lines
3.6 KiB
YAML
metadata:
|
|
name: gradleExecuteBuild
|
|
description: This step runs a gradle build command with parameters provided to the step.
|
|
longDescription: This step runs a gradle build command with parameters provided to the step.
|
|
spec:
|
|
inputs:
|
|
params:
|
|
- name: path
|
|
aliases:
|
|
- name: buildGradlePath
|
|
deprecated: false
|
|
type: string
|
|
description: Path to the folder with build.gradle (or build.gradle.kts) file which should be executed.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
mandatory: false
|
|
- name: task
|
|
type: string
|
|
description: Gradle task that should be executed.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
mandatory: false
|
|
default: build
|
|
- name: publish
|
|
type: bool
|
|
description: Configures gradle to publish the artifact to a repository.
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
- name: repositoryUrl
|
|
type: string
|
|
description: Url to the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUrl
|
|
- name: repositoryPassword
|
|
type: string
|
|
description: Password for the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
secret: true
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryPassword
|
|
- name: repositoryUsername
|
|
type: string
|
|
description: Username for the repository to which the project artifacts should be published.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
secret: true
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: custom/repositoryUsername
|
|
- name: createBOM
|
|
type: bool
|
|
description: Creates the bill of materials (BOM) using CycloneDX plugin.
|
|
scope:
|
|
- GENERAL
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
- name: artifactVersion
|
|
type: string
|
|
description: Version of the artifact to be built.
|
|
scope:
|
|
- GENERAL
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: artifactVersion
|
|
- name: artifactGroupId
|
|
type: string
|
|
description: The group of the artifact.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: groupId
|
|
- name: artifactId
|
|
type: string
|
|
description: The name of the artifact.
|
|
scope:
|
|
- PARAMETERS
|
|
- STAGES
|
|
- STEPS
|
|
resourceRef:
|
|
- name: commonPipelineEnvironment
|
|
param: artifactId
|
|
- name: useWrapper
|
|
type: bool
|
|
description: If set to false all commands are executed using 'gradle', otherwise 'gradlew' is executed.
|
|
scope:
|
|
- STEPS
|
|
- STAGES
|
|
- PARAMETERS
|
|
default: false
|
|
outputs:
|
|
resources:
|
|
- name: reports
|
|
type: reports
|
|
params:
|
|
- filePattern: "**/bom-gradle.xml"
|
|
type: sbom
|
|
containers:
|
|
- name: gradle
|
|
image: gradle:6-jdk11-alpine
|