mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-28 20:26:05 +00:00
Some checks failed
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (ubuntu-20.04) (push) Has been cancelled
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (windows-2022) (push) Has been cancelled
HIRS Build and Unit Test / ACA_Provisioner_Unit_Tests (push) Has been cancelled
HIRS System Tests / DockerTests (push) Has been cancelled
Dotnet Provisioner Unit Tests / Evaluate Tests (push) Has been cancelled
* 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.
112 lines
2.9 KiB
Groovy
112 lines
2.9 KiB
Groovy
plugins {
|
|
id "com.netflix.nebula.ospackage" version "11.10.0"
|
|
}
|
|
// Get version from main project gradle
|
|
def packVersion = properties.get("packageVersion");
|
|
def jarVersion = properties.get("jarVersion");
|
|
|
|
dependencies {
|
|
implementation project(':HIRS_Utils')
|
|
implementation libs.commons.io
|
|
implementation libs.jcommander
|
|
}
|
|
|
|
ext.configDir = new File(projectDir, 'config')
|
|
|
|
jar {
|
|
// Keep jar clean:
|
|
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest {
|
|
attributes(
|
|
"Main-Class": "hirs.tcg_eventlog.Main",
|
|
'Class-Path': configurations.runtimeClasspath.files.collect { it.getName() }.join(' ')
|
|
)
|
|
}
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
//jar name format: [archiveBaseName]-[archiveAppendix]-[archiveVersion]-[archiveClassifier].[archiveExtension]
|
|
archiveVersion = jarVersion
|
|
}
|
|
|
|
// Produce packages
|
|
ospackage {
|
|
packageName = 'tcg-eventlog-tool'
|
|
os = LINUX
|
|
arch = NOARCH
|
|
version = "$packVersion"
|
|
release = '1'
|
|
|
|
user 'root'
|
|
fileMode = 0755
|
|
|
|
into('/opt/eltool/lib') {
|
|
from jar.outputs.files
|
|
from configurations.runtimeClasspath
|
|
}
|
|
into('/opt/eltool/scripts') {
|
|
from('scripts') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.bat')
|
|
}
|
|
}
|
|
}
|
|
into('/opt/eltool/docs') {
|
|
from('docs') {
|
|
exclude {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.odt')
|
|
}
|
|
}
|
|
from('./') {
|
|
include {
|
|
FileTreeElement details ->
|
|
details.file.name.endsWith('.md')
|
|
}
|
|
}
|
|
}
|
|
// Copy vendor-table into /tmp to avoid conflict with the ACA
|
|
into('/opt/eltool/default-properties') {
|
|
from('../../HIRS_Utils/src/main/resources/vendor-table.json') {
|
|
fileMode 0664
|
|
addParentDirs = true
|
|
}
|
|
}
|
|
|
|
// place elt link in system path to enable command line access
|
|
link("/usr/local/bin/elt", "/opt/eltool/scripts/eventlog.sh", 0x755)
|
|
|
|
// Post Install
|
|
postInstall "echo ${jarVersion} > /opt/eltool/VERSION"
|
|
// Post Uninstall
|
|
postUninstall 'rm -rf /opt/eltool'
|
|
|
|
buildRpm {
|
|
arch = X86_64
|
|
requires('hwdata', '0.314', GREATER | EQUAL)
|
|
}
|
|
buildDeb {
|
|
arch = 'amd64'
|
|
requires('hwdata', '0.314', GREATER | EQUAL)
|
|
}
|
|
|
|
}
|
|
|
|
|
|
task buildZip(type: Zip) {
|
|
dependsOn jar
|
|
from(tasks.jar.archiveFile) {
|
|
rename(filename ->
|
|
"${project.name}.jar")
|
|
into '/'
|
|
}
|
|
|
|
archiveBaseName.set(project.name)
|
|
destinationDirectory.set(file("$buildDir/distributions"))
|
|
archiveFileName.set("${project.name}.zip")
|
|
}
|
|
|
|
buildZip.dependsOn jar
|
|
//build.dependsOn buildZip |