Maxim Khutornenko created AURORA-1473:
-----------------------------------------
Summary: Add build properties into scheduler /var endpoint
Key: AURORA-1473
URL: https://issues.apache.org/jira/browse/AURORA-1473
Project: Aurora
Issue Type: Task
Components: Build
Reporter: Maxim Khutornenko
The https://reviews.apache.org/r/37987/ removed (legitimately) an unused piece
of functionality that could be very useful to us. The BuildInfo used to
aggregate build properties (see below) and exposed them via our stats /var
endpoint. Suggest restoring BuildInfo and adding a gradle hook to populate
build details.
Example bash script collecting git/build props:
{noformat}
set -eu
properties_file=$1
mkdir -p $(dirname $properties_file)
cat > $properties_file <<EOF
build.time=$(date -u +'%Y-%m-%d %H:%M:%S %Z')
build.date=$(date +'%a %Y-%m-%d')
build.git.revision=$(git rev-parse HEAD)
build.git.tag=$(git describe --dirty)
build.machine=$(hostname -f)
build.path=$PWD
build.user.name=$USER
EOF
{noformat}
Example gradle integration:
{noformat}
task generateBuildProperties (type:Exec) {
def outputDir = file("${buildDir}/build-properties")
def outputFile = file("${outputDir}/build.properties")
inputs.dir rootDir
outputs.dir outputDir
doFirst {
outputDir.exists() || outputDir.mkdirs()
}
commandLine "${projectDir}/build-support/generate-build-properties",
"${outputFile}"
}
sourceSets {
main {
output.dir generateBuildProperties
}
}
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)