feat(Java-Build): Additional Build Options in Maven and Gradle
This commit is contained in:
parent
c58d3bed4d
commit
e788ed7ce0
@ -10,6 +10,7 @@ The resulting build files will be published as artefacts.
|
|||||||
|===
|
|===
|
||||||
|Name |Description | Default Value
|
|Name |Description | Default Value
|
||||||
|GRADLE_CLI_OPTS | Additional Options that will be passed to Gradle | ""
|
|GRADLE_CLI_OPTS | Additional Options that will be passed to Gradle | ""
|
||||||
|
|GRADLE_CLI_BUILD_OPTS | Additional Options that will be passed to Gradle while Building | ""
|
||||||
|===
|
|===
|
||||||
|
|
||||||
.gradle-build-template
|
.gradle-build-template
|
||||||
|
|||||||
@ -7,6 +7,7 @@ These Templates will build a .jar file with Maven and provides it as an Artifact
|
|||||||
.Variables
|
.Variables
|
||||||
|===
|
|===
|
||||||
|Name |Description | Default Value
|
|Name |Description | Default Value
|
||||||
|
|MAVEN_CLI_BUILD_OPTS | Additional Options that will be passed to Maven while Building | ""
|
||||||
|===
|
|===
|
||||||
|
|
||||||
.mvn-build-template
|
.mvn-build-template
|
||||||
|
|||||||
@ -27,14 +27,6 @@ Test-Java:
|
|||||||
- job: "Build-Java"
|
- job: "Build-Java"
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
|
||||||
#todo put this into backend template
|
|
||||||
#Database-Diff:
|
|
||||||
# extends:
|
|
||||||
# - .maven-database-diff
|
|
||||||
# needs:
|
|
||||||
# - job: "Build-Java"
|
|
||||||
# artifacts: true
|
|
||||||
|
|
||||||
Repo-CVE-Scan:
|
Repo-CVE-Scan:
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
extends: .repo-cve-scan-trivy
|
extends: .repo-cve-scan-trivy
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
$(sed -i /^version/s/$GRADLE_VERSION/\'$CI_COMMIT_TAG\'/ $PATH_TO_VERSION_FILE)
|
$(sed -i /^version/s/$GRADLE_VERSION/\'$CI_COMMIT_TAG\'/ $PATH_TO_VERSION_FILE)
|
||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- "./gradlew --build-cache assemble $GRADLE_CLI_OPTS"
|
- "./gradlew --build-cache assemble $GRADLE_CLI_BUILD_OPTS $GRADLE_CLI_OPTS"
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 weeks
|
expire_in: 2 weeks
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- "cd $BACKEND_DIR"
|
- "cd $BACKEND_DIR"
|
||||||
- mvn $MAVEN_CLI_OPTS package -DskipTests
|
- mvn $MAVEN_CLI_OPTS package $MAVEN_CLI_BUILD_OPTS -DskipTests
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 weeks
|
expire_in: 2 weeks
|
||||||
when: always
|
when: always
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user