Commit 73ec23b2 authored by cpomies's avatar cpomies
Browse files

Modified get and push on rsync server

parent 26087a86
......@@ -13,6 +13,6 @@
. $(dirname $0)/utils.sh
set_common --build
get_config_file
get_sources
get_config_file "${flavour}" "${slot}" "${slot_build_id}" "${ARTIFACTS_DIR}"
get_sources "${flavour}" "${slot}" "${slot_build_id}" "${ARTIFACTS_DIR}"
build_slot
......@@ -16,7 +16,7 @@
set_common
get_configs_folder
checkout_slot
push_artifact
push_artifact "${ARTIFACTS_DIR}" "${flavour}" "${slot}" "${slot_build_id}"
check_preconditions
......@@ -13,5 +13,5 @@
. $(dirname $0)/utils.sh
set_common
get_config_file
get_config_file "${flavour}" "${slot}" "${slot_build_id}" "${ARTIFACTS_DIR}"
execute_preconditions
......@@ -58,7 +58,7 @@ function build_slot {
fi
if [ "$JENKINS_MOCK" != "true" ] ; then
push_artifact
push_artifact "${ARTIFACTS_DIR}" "${flavour}" "${slot}" "${slot_build_id}"
fi
# if possible and requested, generate glimpse indexes and upload them to buildlhcb
......@@ -71,7 +71,7 @@ function build_slot {
time lbn-rpm --glimpse --verbose --build-id "${slot}.${slot_build_id}" --artifacts-dir "${ARTIFACTS_DIR}" ${config_file}
fi
if [ "$JENKINS_MOCK" != "true" ] ; then
push_artifact
push_artifact "${ARTIFACTS_DIR}" "${flavour}" "${slot}" "${slot_build_id}"
fi
fi
fi
......
function get_config_file {
if [ "$SET_COMMON" != "true" ] ; then
echo "ERROR : $0 need SET_COMMON set with true"
USAGE="get_config_file flavour slot slot_build_id directory_dest"
if [ $# != 4 ] ; then
echo "ERROR : Usage : ${USAGE}"
exit 1
fi
SOURCE="${RSYNC_DIR}"
if [ -d "${RSYNC_WORKDIR}" ] ; then
SOURCE="${RSYNC_WORKDIR}"
fi
flavour="$1"
slot="$2"
slot_build_id="$3"
DESTINATION="$4"
SOURCE=$(get_remote_directory "$flavour" "$slot" "$slot_build_id")
lbn-manage-rsync --verbose --get-config "${SOURCE}" "${ARTIFACTS_DIR}"
lbn-manage-rsync --verbose --get-config "${SOURCE}" "${DESTINATION}"
if [ -e ${ARTIFACTS_DIR}/${slot}.json ] ; then
export config_file=${ARTIFACTS_DIR}/${slot}.json
if [ -e ${DESTINATION}/${slot}.json ] ; then
export config_file=${DESTINATION}/${slot}.json
else
export config_file=${ARTIFACTS_DIR}/configuration.xml#${slot}
export config_file=${DESTINATION}/configuration.xml#${slot}
fi
export GET_CONFIG_FILE="true"
......
function get_sources {
USAGE="get_sources flavour slot slot_build_id directory_dest"
if [ "$SET_COMMON" != "true" ] ; then
echo "ERROR : $0 need SET_COMMON set with true"
if [ $# != 4 ] ; then
echo "ERROR : Usage : ${USAGE}"
exit 1
fi
lbn-manage-rsync --verbose --get-sources "${RSYNC_DIR}" "${ARTIFACTS_DIR}"
flavour="$1"
slot="$2"
slot_build_id="$3"
DESTINATION="$4"
SOURCE=$(get_remote_directory "$flavour" "$slot" "$slot_build_id")
lbn-manage-rsync --verbose --get-sources "${SOURCE}" "${DESTINATION}"
export GET_SOURCES="true"
}
function push_artifact {
if [ "$SET_COMMON" != "true" ] ; then
echo "ERROR : $0 need SET_COMMON set with true"
USAGE="push_artifact directory_src flavour slot slot_build_id "
if [ $# != 4 ] ; then
echo "ERROR : Usage : ${USAGE}"
exit 1
fi
lbn-manage-rsync --verbose "${ARTIFACTS_DIR}" "${RSYNC_DIR}"
SOURCE="$1"
flavour="$2"
slot="$3"
slot_build_id="$4"
DESTINATION=$(get_remote_directory "$flavour" "$slot" "$slot_build_id")
lbn-manage-rsync --verbose "${SOURCE}" "${DESTINATION}"
}
Markdown is supported
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