Unverified Commit 7074494f authored by Shawn Webb's avatar Shawn Webb
Browse files

Publish build logs to git



Instead of publishing the results to a private mailing list, publish the
results to git.
Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
github-issue:	#7
parent 53363d9e
......@@ -41,6 +41,31 @@ TOPDIR=$(get_topdir ${0})
. ${TOPDIR}/../lib/publish.sh
. ${TOPDIR}/../lib/util.sh
perform_build() {
local forcebuild
forcebuild=${1}
assert_unlocked && lock_build
update_codebase || return ${?}
if ! should_build ${forcebuild}; then
unlock_build
return 0
fi
clean_build && \
build_hardenedbsd && \
build_release && \
stage_release && \
sign_release && \
publish_release && \
kick_publisher_tires && \
cache_codebase_hashish && \
unlock_build
return ${?}
}
main() {
local self
local forcebuild
......@@ -65,27 +90,9 @@ main() {
config_set_dynamic
(
assert_unlocked && lock_build
update_codebase || exit ${?}
if ! should_build ${forcebuild}; then
unlock_build
exit 0
fi
clean_build && \
build_hardenedbsd && \
build_release && \
stage_release && \
sign_release && \
publish_release && \
kick_publisher_tires && \
cache_codebase_hashish && \
unlock_build
exit ${?}
) | build_log 2>&1
perform_build ${forcebuild} | build_log 2>&1
publish_log
return ${?}
}
......
......@@ -25,6 +25,7 @@
# SUCH DAMAGE.
config_set_defaults() {
HBSD_BUILD_NAME="CURRENT.amd64.amd64"
HBSD_GPG_KEY=""
#HBSD_GPG_KEY="BB53388D3BD9892815CB9E30819B11A26FFD188D"
HBSD_INDEX_FILE=/build/index
......@@ -37,7 +38,7 @@ config_set_defaults() {
HBSD_TARGET=amd64
HBSD_TARGET_ARCH=amd64
HBSD_NOCLEAN="-DNO_CLEAN"
HBSD_LOGDIR=/build/logs/13-current.amd64
HBSD_LOGDIR=/build/logs
HBSD_KEEP_NBUILDS=10
HBSD_CACHEDIR=/build/cache/13-current.amd64
......
......@@ -35,5 +35,24 @@ log_err() {
}
build_log() {
tee ${HBSD_BUILD_LOG} 2>&1
local log
log="${HBSD_LOGDIR}/builds/${HBSD_BUILD_NAME}/${HBSD_BUILDNUMBER}.log"
tee ${log}
}
publish_log() {
local log
log="${HBSD_LOGDIR}/builds/${HBSD_BUILD_NAME}/${HBSD_BUILDNUMBER}.log"
(
cd ${HBSD_LOGDIR}
git add ${log}
git commit -m "BUILD: ${HBSD_BUILD_NAME}/${HBSD_BUILDNUMBER}.log"
git push
exit ${?}
)
return ${?}
}
......@@ -41,12 +41,12 @@ kick_publisher_tires() {
[ -z "${HBSD_MIRROR_MASTER}" ] && return 0
rsync -a ${HBSD_PUBDIR}/${HBSD_BUILDNUMBER}/ \
rsync -va ${HBSD_PUBDIR}/${HBSD_BUILDNUMBER}/ \
${HBSD_MIRROR_MASTER}:${HBSD_MIRROR_PUBDIR}/build-${HBSD_BUILDNUMBER}/
res=${?}
[ ${res} -gt 0 ] && return ${res}
rsync -a ${HBSD_PUBDIR}/BUILD-LATEST \
rsync -va ${HBSD_PUBDIR}/BUILD-LATEST \
${HBSD_MIRROR_MASTER}:${HBSD_MIRROR_PUBDIR}/
return ${?}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment