Compare commits
No commits in common. "f080f34bb33b8d7d1ab603ad9385e739846ace0a" and "966a7790650ba852739a95be35fc5d68ab64e760" have entirely different histories.
f080f34bb3
...
966a779065
@ -81,14 +81,12 @@ clone_customer_repository () {
|
||||
$(exec_git_command git clone "$1")
|
||||
if [ $? -eq 0 ]; then
|
||||
log_debug "$func:${LINENO} cloning ${1} done"
|
||||
GIT_CLONE_EXECUTED=1
|
||||
# after cloning, cd into repository, and re-initialize,
|
||||
# setting the work-tree as "/". This has the effect that
|
||||
# a "git pull" will automatically fetched files in the
|
||||
# corresponding sytem-folders.
|
||||
if cd ${CUSTOMER_ID_BASE_DIR}; then
|
||||
# local res=$(exec_git_command git --git-dir=.git --work-tree=/ init)
|
||||
exec_git_command git checkout "$LOCAL_BRANCH"
|
||||
exec_git_command git config core.worktree "/"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
# re-initialized. copy post-merge (a hook called
|
||||
|
20
read_config
20
read_config
@ -28,8 +28,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly PROGRAM=`basename $0`
|
||||
readonly WORKSPACE_DIR=workspace
|
||||
|
||||
GIT_CLONE_EXECUTED=0
|
||||
|
||||
EXITCODE=$RC_SUCCESS
|
||||
CLONE_CUSTOMER_REPOSITORY=false
|
||||
|
||||
@ -94,16 +92,6 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
readonly ZONE_GROUPS=(${__zone_groups[@]})
|
||||
assert_a ZONE_GROUPS
|
||||
|
||||
# TODO
|
||||
# TODO: falls mehrere gruppen/zonen auftauchen hier anpassen
|
||||
# TODO
|
||||
# Zone aus /etc/zone_nr auslesen
|
||||
#
|
||||
readonly ZONE_GROUP=1
|
||||
readonly ZONE=1
|
||||
|
||||
readonly LOCAL_BRANCH="$(cat "$cf" | jq -r .local_branches[$ZONE])"
|
||||
|
||||
return 0
|
||||
}
|
||||
###############################################################################
|
||||
@ -163,7 +151,13 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
||||
# readonly CUST_BASE_DIRS=(${__customer_base_dirs[@]})
|
||||
# assert_a CUST_BASE_DIRS
|
||||
|
||||
|
||||
# TODO
|
||||
# TODO: falls mehrere gruppen/zonen auftauchen hier anpassen
|
||||
# TODO
|
||||
# Zone aus /etc/zone_nr auslesen
|
||||
#
|
||||
readonly ZONE_GROUP=1
|
||||
readonly ZONE=1
|
||||
readonly CUST_BASE_DIR="$CUSTOMER_ID_BASE_DIR"
|
||||
#readonly CUST_BASE_DIR="${CUST_BASE_DIRS[$ZONE]}"
|
||||
#assert_d CUST_BASE_DIR
|
||||
|
@ -11,10 +11,6 @@
|
||||
"" : "zone file for PSA",
|
||||
"zone" : "/etc/zone_nr",
|
||||
|
||||
"" : "local branches",
|
||||
"local_branches" : ["master",
|
||||
"zg1/zone1", "zg1/zone2", "zg1/zone3"],
|
||||
|
||||
"" : "customer number of PSA",
|
||||
"customer_id_" : "/etc/cust_nr",
|
||||
|
||||
|
@ -41,16 +41,13 @@ update_psa() {
|
||||
|
||||
log_debug "$func:${LINENO}: fetch/merge updates..."
|
||||
|
||||
# Fetch new updates (using git). but only when repository has already been
|
||||
# cloned.
|
||||
if [ $GIT_CLONE_EXECUTED -eq 0 ]; then
|
||||
if ! fetch_customer_updates; then
|
||||
log_error "$func:${LINENO}: fetch no data for $customer_id"\
|
||||
"-> no files to update -> no psa update"
|
||||
update_psa_false_alarm \
|
||||
"update request, but no change in $CUSTOMER_REPOSITORY_PATH"
|
||||
# TODO
|
||||
fi
|
||||
# Fetch new updates (using git)
|
||||
if ! fetch_customer_updates; then
|
||||
log_error "$func:${LINENO}: fetch no data for $customer_id"\
|
||||
"-> no files to update -> no psa update"
|
||||
update_psa_false_alarm \
|
||||
"update request, but no change in $CUSTOMER_REPOSITORY_PATH"
|
||||
# TODO
|
||||
fi
|
||||
|
||||
update_psa_pull_customer_repository # message to ISMAS
|
||||
|
Loading…
x
Reference in New Issue
Block a user