HIRS/HIRS_AttestationCAPortal/build.gradle

164 lines
5.6 KiB
Groovy
Raw Permalink Normal View History

plugins {
id 'application'
id 'war'
[#863] Placed Dependencies and Dependency Versions In TOML file (#885) * issue_863: Successfully moved all the dependencies to toml file and currently replacing dependencies listed in the build.gradle file with the ones referenced in the toml file * issue_863: finished updating dependency versions. Ready for PR * issue_863: downgraded versions since there was an issue with the dependencies versions and the ci/cd pipeline in git. will update each depedency slowly to ensure that upgrades are down correctly. * issue_863: upgrading this slowly but surely * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes. * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) partIII * issue_863: Part IV of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part V of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part VI of updating dependencies slowly * issue_863: Part VII of updating dependencies * issue_863: Part 8 of updating dependencies * issue_863: Part 9 of updating dependencies * issue_863: Part 10 of updating dependencies * issue_863: Part 12 of updating dependencies * issue_863: Part 13 of updating dependencies * issue_863: Part 14 of updating dependencies * issue_863: Part 15 of updating dependencies * issue_863: Updating tomcat core. * issue_863: removed some critical vulnerable dependencies * issue_863: updated spring boot version. second try at it. * issue_863: undid spring update. need to figure out how to smoothly transition to newer spring. * issue_863: updated spring boot, hibernate, and spring retry. Removed an unused dependency. * issue_863: removed unused dependencies and am currently resolving critical vulnerable dependendcies * issue_863: reverted changes from last commit. let's see if that makes a difference * issue_863: Updated gradle version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version again. Ready for PR. Vulnerability issues will be addressed in another PR. I've cut down vulnerabilities by quite a lot and I want to test the new OWASP plugin against the remaining vulnerabilities. * issue_863: Finishing touches to the PR. Upgraded some more dependencies and removed unused one. * issue_863: Removed testng from codebase. Has been officially replaced with spring junit.
2025-01-13 14:53:04 +00:00
id 'com.netflix.nebula.ospackage' version '11.10.0'
id 'org.springframework.boot' version '3.0.13'
id 'io.spring.dependency-management' version '1.1.7'
}
2018-09-06 13:47:33 +00:00
// Get version from main project gradle
[#863] Placed Dependencies and Dependency Versions In TOML file (#885) * issue_863: Successfully moved all the dependencies to toml file and currently replacing dependencies listed in the build.gradle file with the ones referenced in the toml file * issue_863: finished updating dependency versions. Ready for PR * issue_863: downgraded versions since there was an issue with the dependencies versions and the ci/cd pipeline in git. will update each depedency slowly to ensure that upgrades are down correctly. * issue_863: upgrading this slowly but surely * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes. * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) partIII * issue_863: Part IV of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part V of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part VI of updating dependencies slowly * issue_863: Part VII of updating dependencies * issue_863: Part 8 of updating dependencies * issue_863: Part 9 of updating dependencies * issue_863: Part 10 of updating dependencies * issue_863: Part 12 of updating dependencies * issue_863: Part 13 of updating dependencies * issue_863: Part 14 of updating dependencies * issue_863: Part 15 of updating dependencies * issue_863: Updating tomcat core. * issue_863: removed some critical vulnerable dependencies * issue_863: updated spring boot version. second try at it. * issue_863: undid spring update. need to figure out how to smoothly transition to newer spring. * issue_863: updated spring boot, hibernate, and spring retry. Removed an unused dependency. * issue_863: removed unused dependencies and am currently resolving critical vulnerable dependendcies * issue_863: reverted changes from last commit. let's see if that makes a difference * issue_863: Updated gradle version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version again. Ready for PR. Vulnerability issues will be addressed in another PR. I've cut down vulnerabilities by quite a lot and I want to test the new OWASP plugin against the remaining vulnerabilities. * issue_863: Finishing touches to the PR. Upgraded some more dependencies and removed unused one. * issue_863: Removed testng from codebase. Has been officially replaced with spring junit.
2025-01-13 14:53:04 +00:00
def packVersion = properties.get("packageVersion")
def jarVersion = properties.get("jarVersion")
def projVersion = properties.get("projVersion")
//println "packageVersion is ${projVersion}"
bootRun {
if (project.hasProperty('debug')) {
jvmArgs project.debug
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
2018-09-06 13:47:33 +00:00
}
2023-06-27 19:58:36 +00:00
all*.exclude module: 'spring-boot-starter-logging'
2018-09-06 13:47:33 +00:00
}
dependencies {
2023-03-07 01:54:49 +00:00
implementation project(':HIRS_Utils')
implementation project(':HIRS_AttestationCA')
implementation libs.bouncycastle
implementation libs.guava
[#863] Placed Dependencies and Dependency Versions In TOML file (#885) * issue_863: Successfully moved all the dependencies to toml file and currently replacing dependencies listed in the build.gradle file with the ones referenced in the toml file * issue_863: finished updating dependency versions. Ready for PR * issue_863: downgraded versions since there was an issue with the dependencies versions and the ci/cd pipeline in git. will update each depedency slowly to ensure that upgrades are down correctly. * issue_863: upgrading this slowly but surely * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes. * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) partIII * issue_863: Part IV of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part V of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part VI of updating dependencies slowly * issue_863: Part VII of updating dependencies * issue_863: Part 8 of updating dependencies * issue_863: Part 9 of updating dependencies * issue_863: Part 10 of updating dependencies * issue_863: Part 12 of updating dependencies * issue_863: Part 13 of updating dependencies * issue_863: Part 14 of updating dependencies * issue_863: Part 15 of updating dependencies * issue_863: Updating tomcat core. * issue_863: removed some critical vulnerable dependencies * issue_863: updated spring boot version. second try at it. * issue_863: undid spring update. need to figure out how to smoothly transition to newer spring. * issue_863: updated spring boot, hibernate, and spring retry. Removed an unused dependency. * issue_863: removed unused dependencies and am currently resolving critical vulnerable dependendcies * issue_863: reverted changes from last commit. let's see if that makes a difference * issue_863: Updated gradle version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version again. Ready for PR. Vulnerability issues will be addressed in another PR. I've cut down vulnerabilities by quite a lot and I want to test the new OWASP plugin against the remaining vulnerabilities. * issue_863: Finishing touches to the PR. Upgraded some more dependencies and removed unused one. * issue_863: Removed testng from codebase. Has been officially replaced with spring junit.
2025-01-13 14:53:04 +00:00
implementation libs.gson
implementation libs.jakarta.persistence.api
implementation libs.jakarta.servlet
implementation libs.jakarta.xml
2023-02-16 17:05:36 +00:00
[#863] Placed Dependencies and Dependency Versions In TOML file (#885) * issue_863: Successfully moved all the dependencies to toml file and currently replacing dependencies listed in the build.gradle file with the ones referenced in the toml file * issue_863: finished updating dependency versions. Ready for PR * issue_863: downgraded versions since there was an issue with the dependencies versions and the ci/cd pipeline in git. will update each depedency slowly to ensure that upgrades are down correctly. * issue_863: upgrading this slowly but surely * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes. * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) partIII * issue_863: Part IV of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part V of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part VI of updating dependencies slowly * issue_863: Part VII of updating dependencies * issue_863: Part 8 of updating dependencies * issue_863: Part 9 of updating dependencies * issue_863: Part 10 of updating dependencies * issue_863: Part 12 of updating dependencies * issue_863: Part 13 of updating dependencies * issue_863: Part 14 of updating dependencies * issue_863: Part 15 of updating dependencies * issue_863: Updating tomcat core. * issue_863: removed some critical vulnerable dependencies * issue_863: updated spring boot version. second try at it. * issue_863: undid spring update. need to figure out how to smoothly transition to newer spring. * issue_863: updated spring boot, hibernate, and spring retry. Removed an unused dependency. * issue_863: removed unused dependencies and am currently resolving critical vulnerable dependendcies * issue_863: reverted changes from last commit. let's see if that makes a difference * issue_863: Updated gradle version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version again. Ready for PR. Vulnerability issues will be addressed in another PR. I've cut down vulnerabilities by quite a lot and I want to test the new OWASP plugin against the remaining vulnerabilities. * issue_863: Finishing touches to the PR. Upgraded some more dependencies and removed unused one. * issue_863: Removed testng from codebase. Has been officially replaced with spring junit.
2025-01-13 14:53:04 +00:00
// pull the pci dependency and ...
implementation libs.pci
// and explicitly include the patched version of the apache http client dependency
implementation libs.apacheHttpClient
[#863] Placed Dependencies and Dependency Versions In TOML file (#885) * issue_863: Successfully moved all the dependencies to toml file and currently replacing dependencies listed in the build.gradle file with the ones referenced in the toml file * issue_863: finished updating dependency versions. Ready for PR * issue_863: downgraded versions since there was an issue with the dependencies versions and the ci/cd pipeline in git. will update each depedency slowly to ensure that upgrades are down correctly. * issue_863: upgrading this slowly but surely * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes. * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) * issue_863: upgrading this slowly but surely again. testing to see if github's ci/cd is happy still with these set of changes (again) partIII * issue_863: Part IV of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part V of upgrading this slowly to see if github's ci/cd is happy still with these set of changes (again) * issue_863: Part VI of updating dependencies slowly * issue_863: Part VII of updating dependencies * issue_863: Part 8 of updating dependencies * issue_863: Part 9 of updating dependencies * issue_863: Part 10 of updating dependencies * issue_863: Part 12 of updating dependencies * issue_863: Part 13 of updating dependencies * issue_863: Part 14 of updating dependencies * issue_863: Part 15 of updating dependencies * issue_863: Updating tomcat core. * issue_863: removed some critical vulnerable dependencies * issue_863: updated spring boot version. second try at it. * issue_863: undid spring update. need to figure out how to smoothly transition to newer spring. * issue_863: updated spring boot, hibernate, and spring retry. Removed an unused dependency. * issue_863: removed unused dependencies and am currently resolving critical vulnerable dependendcies * issue_863: reverted changes from last commit. let's see if that makes a difference * issue_863: Updated gradle version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version, fixed more vulnerabilities, now figuring what to do with the remaining vulnerabilities. * issue_863: Updated gradle plugins version again. Ready for PR. Vulnerability issues will be addressed in another PR. I've cut down vulnerabilities by quite a lot and I want to test the new OWASP plugin against the remaining vulnerabilities. * issue_863: Finishing touches to the PR. Upgraded some more dependencies and removed unused one. * issue_863: Removed testng from codebase. Has been officially replaced with spring junit.
2025-01-13 14:53:04 +00:00
implementation libs.mariadb.java.client
implementation libs.spring.boot.starter.web
//implementation libs.spring.framework.webmvc
implementation libs.spring.boot.starter.validation
implementation libs.spring.boot.starter.data.jpa
implementation libs.spring.boot.starter.log4j2
implementation libs.tomcat.embed.jasper
compileOnly libs.lombok
annotationProcessor libs.lombok
providedRuntime libs.spring.boot.starter.tomcat
testImplementation libs.hsqldb
testImplementation libs.spring.boot.starter.test
testCompileOnly libs.lombok
testAnnotationProcessor libs.lombok
}
test {
useJUnitPlatform()
}
2018-09-06 13:47:33 +00:00
2024-02-21 18:16:13 +00:00
task buildVersion() {
doLast {
def verFile = new File(projectDir, "build/VERSION")
verFile.write("${jarVersion}")
2024-02-21 18:16:13 +00:00
}
}
ospackage {
packageName = 'HIRS_AttestationCA'
description = 'HIRS Attestation CA. Use systemctl status hirs-aca'
os = LINUX
arch = NOARCH
version = "$packVersion"
release = '2'
user 'root'
fileMode = 0755
addParentDirs = true
createDirectoryEntry true
into('/etc/hirs') {
from '../VERSION'
}
// copy json tables
into('/etc/hirs/aca/default-properties') {
from '../HIRS_AttestationCA/src/main/resources/component-class.json'
from '../HIRS_Utils/src/main/resources/vendor-table.json'
}
// copy springboot property file
into('/etc/hirs/aca/') {
from '../HIRS_AttestationCAPortal/src/main/resources/application.properties'
from 'build/VERSION'
}
// copy setup scripts to /opt/hirs/aca
into('/opt/hirs/aca/scripts/') {
from '../package/linux/'
}
// copy the war file into /opt/hirs/aca
into('/opt/hirs/aca/') {
from '../HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war'
user 'root'
fileMode = 0755
}
2024-02-21 18:16:13 +00:00
2024-04-04 20:27:02 +00:00
// Install - check for existing setup
preInstall 'if [ -d /etc/hirs ]; then echo "Error: /etc/hirs/ exists, aborting install"; exit 1; fi;'
2024-04-04 20:27:02 +00:00
preInstall 'if [ -d /opt/hirs ]; then echo "Error: /opt/hirs/ exists, aborting install"; exit 1; fi;'
// Uninstall
preUninstall 'bash /opt/hirs/aca/scripts/aca/aca_remove_setup.sh $1'
2024-03-18 16:32:30 +00:00
preUninstall 'bash /opt/hirs/aca/scripts/systemd/aca_disable_service.sh'
2024-02-23 20:19:02 +00:00
postUninstall 'if [ -d /etc/hirs ]; then rm -rf /etc/hirs; fi;'
postUninstall 'if [ -d /opt/hirs ]; then rm -rf /opt/hirs; fi;'
2024-03-28 19:26:21 +00:00
buildRpm {
dependsOn ':HIRS_AttestationCAPortal:buildVersion'
dependsOn ':HIRS_AttestationCAPortal:bootWar'
arch = X86_64
// Required apps will be aut installed by dnf if not present
requires('java-17-openjdk', '17.0', GREATER | EQUAL)
requires('mariadb-server', '10.3', GREATER | EQUAL)
requires('procps-ng', '3.3.15', GREATER | EQUAL)
2024-02-21 18:16:13 +00:00
requires('alternatives', '1.19', GREATER | EQUAL)
requires('hwdata', '0.314', GREATER | EQUAL)
// Post Trans stage (Occurs after required app and postInstall stage)
// Note postInstall wont wait for required apps
2024-02-21 18:16:13 +00:00
postTrans 'update-alternatives --set java java-17-openjdk.x86_64'
2024-02-23 20:19:02 +00:00
postTrans 'firewall-cmd --add-port=8443/tcp --permanent'
postTrans 'firewall-cmd --reload'
postTrans 'bash /opt/hirs/aca/scripts/aca/aca_setup.sh -u'
2024-03-18 16:32:30 +00:00
postTrans 'bash /opt/hirs/aca/scripts/systemd/aca_enable_service.sh'
postTrans 'chmod +x /opt/hirs/aca/scripts/aca/*'
postTrans 'if [ -f /opt/hirs/aca/VERSION ]; then rm /opt/hirs/aca/VERSION; fi;'
// Wait for ACA to start up before finishing the install
postTrans 'bash /opt/hirs/aca/scripts/aca/check_for_aca.sh'
}
buildDeb {
dependsOn ':HIRS_AttestationCAPortal:buildVersion'
dependsOn ':HIRS_AttestationCAPortal:bootWar'
2023-10-10 18:29:37 +00:00
packageName = 'hirs-attestationca'
arch = 'amd64'
requires('openjdk-17-jdk', '17.0', GREATER | EQUAL)
requires('mariadb-server', '10.3', GREATER | EQUAL)
requires('curl')
requires('hwdata', '0.314', GREATER | EQUAL)
// Install after required packages
postInstall 'bash /opt/hirs/aca/scripts/aca/aca_setup.sh -u'
2024-03-18 16:32:30 +00:00
postInstall 'bash /opt/hirs/aca/scripts/systemd/aca_enable_service.sh'
postInstall 'chmod +x /opt/hirs/aca/scripts/aca/*'
postInstall 'if [ -f /opt/hirs/aca/VERSION ]; then rm /opt/hirs/aca/VERSION; fi;'
// Wait for ACA to start up before finishing the install
postInstall 'bash /opt/hirs/aca/scripts/aca/check_for_aca.sh'
}
}