-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kie-issues#744: Move jenkins pipeline shared libraries (#1131)
* Move jenkins pipeline library * tweak GHA PR check * tweak pom.xml to allow running from different dir * remove tmp files --------- Co-authored-by: jstastny-cz <[email protected]>
- Loading branch information
1 parent
c543e32
commit 90ba73b
Showing
52 changed files
with
13,634 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.github/workflows/jenkins-pipeline-shared-library-maven-tests-PR.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Jenkins Pipeline Shared Libraries Maven Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'jenkins-pipeline-shared-libraries/**' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -B test --file jenkins-pipeline-shared-libraries/pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Jenkins Pipeline Shared Libraries | ||
|
||
This repository contains shared libraries used across different KIE Jenkins pipeline scripts. | ||
|
||
# Development | ||
Your scripts should be located in `/vars` folder. | ||
|
||
## How to cover with unit tests | ||
Once your groovy methods/script files are implemented you should cover them with Spock tests. | ||
Those tests are located in `/test/vars` folder. Remember you should add Jenkins plugins used by the script as a dependency in the `pom.xml` file in case it is not present, like | ||
|
||
```xml | ||
<dependency> | ||
<!-- provides configFileProvider() and configFile() steps --> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>config-file-provider</artifactId> | ||
<version>3.6.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
``` |
Oops, something went wrong.