This repository has been archived by the owner on Nov 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update task images * Update test dependencies
- Loading branch information
1 parent
95da1d0
commit ed327d3
Showing
14 changed files
with
67 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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,46 @@ | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: java-test-pipeline | ||
labels: | ||
apps.kadras.io/pipeline: test | ||
apps.kadras.io/language: java | ||
spec: | ||
description: Runs tests for a Java application using Gradle or Maven. | ||
params: | ||
- name: source-url | ||
- name: source-revision | ||
- name: source-subpath | ||
tasks: | ||
- name: test | ||
params: | ||
- name: source-url | ||
value: $(params.source-url) | ||
- name: source-revision | ||
value: $(params.source-revision) | ||
- name: source-subpath | ||
value: $(params.source-subpath) | ||
taskSpec: | ||
params: | ||
- name: source-url | ||
- name: source-revision | ||
- name: source-subpath | ||
steps: | ||
- name: test | ||
image: cgr.dev/chainguard/jdk:openjdk-17 | ||
securityContext: | ||
runAsNonRoot: true | ||
script: |- | ||
wget -qO- $(params.source-url) | tar xvz -m | ||
cd $(params.source-subpath) | ||
if [ -f gradlew ]; then | ||
chmod +x ./gradlew | ||
./gradlew build --no-daemon | ||
elif [ -f mvnw ]; then | ||
chmod +x ./mvnw | ||
./mvnw test | ||
else | ||
echo "ERROR. This pipeline supports only Java projects using the Maven or Gradle wrappers." | ||
exit 1 | ||
fi |
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
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
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
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
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