remove repo.d generation from build and test scripts
This commit is contained in:
@ -38,3 +38,5 @@ $(<${script_dir}/templates/repository-config/deb.json.template)
|
|||||||
" 2> /dev/null > ${path_prefix}/${platform}_${platform_version}.json
|
" 2> /dev/null > ${path_prefix}/${platform}_${platform_version}.json
|
||||||
fi
|
fi
|
||||||
cd $dir
|
cd $dir
|
||||||
|
|
||||||
|
${mdbci_dir}/mdbci generate-product-repositories --product maxscale_ci --product-version $target
|
||||||
|
|||||||
@ -3,8 +3,10 @@
|
|||||||
{
|
{
|
||||||
"hostname" : "maxscale",
|
"hostname" : "maxscale",
|
||||||
"box" : "$box",
|
"box" : "$box",
|
||||||
|
"memory_size" : "4096",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale",
|
||||||
|
"version" : "${old_target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,8 @@ if [ -d "install_$box" ]; then
|
|||||||
${mdbci_dir}/mdbci destroy $name
|
${mdbci_dir}/mdbci destroy $name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${mdbci_dir}/repository-config/generate_all.sh repo.d
|
|
||||||
${mdbci_dir}/repository-config/maxscale-release.sh $old_target repo.d
|
|
||||||
|
|
||||||
# starting VM for build
|
# starting VM for build
|
||||||
${mdbci_dir}/mdbci --override --template $MDBCI_VM_PATH/$name.json --repo-dir $dir/repo.d generate $name
|
${mdbci_dir}/mdbci --override --template $MDBCI_VM_PATH/$name.json generate $name
|
||||||
${mdbci_dir}/mdbci up $name --attempts=1
|
${mdbci_dir}/mdbci up $name --attempts=1
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
@ -61,12 +58,8 @@ export sshopt="$scpopt $sshuser@$IP"
|
|||||||
|
|
||||||
old_version=`ssh $sshopt "maxscale --version" `
|
old_version=`ssh $sshopt "maxscale --version" `
|
||||||
|
|
||||||
rm -rf repo.d
|
${mdbci_dir}/mdbci setup_repo --product maxscale_ci --product-version ${target} $name/maxscale
|
||||||
${mdbci_dir}/repository-config/generate_all.sh repo.d
|
${mdbci_dir}/mdbci install_product --product maxscale_ci $name/maxscale
|
||||||
${mdbci_dir}/repository-config/maxscale-ci.sh $target repo.d
|
|
||||||
|
|
||||||
${mdbci_dir}/mdbci setup_repo --product maxscale --repo-dir $dir/repo.d $name/maxscale
|
|
||||||
${mdbci_dir}/mdbci install_product --product maxscale $name/maxscale
|
|
||||||
|
|
||||||
res=$?
|
res=$?
|
||||||
|
|
||||||
@ -84,7 +77,7 @@ scp $scpopt ${script_dir}/cnf/$cnf_file $sshuser@$IP:~/
|
|||||||
|
|
||||||
. ${script_dir}/configure_log_dir.sh
|
. ${script_dir}/configure_log_dir.sh
|
||||||
|
|
||||||
${mdbci_dir}/mdbci ssh --command 'service --help' $name/maxscale
|
${mdbci_dir}/mdbci ssh --command 'sudo service --help' $name/maxscale
|
||||||
if [ $? == 0 ] ; then
|
if [ $? == 0 ] ; then
|
||||||
maxscale_start_cmd="sudo service maxscale start"
|
maxscale_start_cmd="sudo service maxscale start"
|
||||||
else
|
else
|
||||||
@ -92,19 +85,25 @@ else
|
|||||||
maxscale_start_cmd="sudo ./maxscale_start.sh 2> /dev/null &"
|
maxscale_start_cmd="sudo ./maxscale_start.sh 2> /dev/null &"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssh $sshopt "sudo cp $cnf_file /etc/maxscale.cnf"
|
ssh $sshopt "sudo cp $cnf_file /etc/maxscale.cnf"
|
||||||
ssh $sshopt "$maxscale_start_cmd" &
|
ssh $sshopt "$maxscale_start_cmd" &
|
||||||
pid_to_kill=$!
|
pid_to_kill=$!
|
||||||
|
|
||||||
sleep 10
|
for i in {1..10}
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
ssh $sshopt $maxadmin_command
|
ssh $sshopt $maxadmin_command
|
||||||
if [ $? != 0 ] ; then
|
maxadm_exit=$?
|
||||||
|
if [ $maxadm_exit == 0 ] ; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $maxadm_exit != 0 ] ; then
|
||||||
echo "Maxadmin executing error"
|
echo "Maxadmin executing error"
|
||||||
res=1
|
res=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
maxadmin_out=`ssh $sshopt $maxadmin_command`
|
maxadmin_out=`ssh $sshopt $maxadmin_command`
|
||||||
echo $maxadmin_out | grep "CLI"
|
echo $maxadmin_out | grep "CLI"
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
|
|||||||
@ -7,12 +7,6 @@ export script_dir="$(dirname $(readlink -f $0))"
|
|||||||
|
|
||||||
. ${script_dir}/set_run_test_variables.sh
|
. ${script_dir}/set_run_test_variables.sh
|
||||||
|
|
||||||
${mdbci_dir}/repository-config/generate_all.sh repo.d
|
|
||||||
${mdbci_dir}/repository-config/maxscale-ci.sh $target repo.d
|
|
||||||
|
|
||||||
|
|
||||||
export repo_dir=$dir/repo.d/
|
|
||||||
|
|
||||||
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
|
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
|
||||||
export backend_box=${backend_box:-"centos_7_"$provider}
|
export backend_box=${backend_box:-"centos_7_"$provider}
|
||||||
|
|
||||||
@ -23,15 +17,21 @@ fi
|
|||||||
${mdbci_dir}/mdbci destroy $name
|
${mdbci_dir}/mdbci destroy $name
|
||||||
mkdir -p ${MDBCI_VM_PATH}/$name
|
mkdir -p ${MDBCI_VM_PATH}/$name
|
||||||
|
|
||||||
mkdir ${MDBCI_VM_PATH}/$name/cnf
|
export cnf_path="${MDBCI_VM_PATH}/$name/cnf/"
|
||||||
cp -r ${cnf_path}/* ${MDBCI_VM_PATH}/$name/cnf/
|
if [ "$product" == "mysql" ] ; then
|
||||||
export cnd_path="${MDBCI_VM_PATH}/$name/cnf/"
|
export cnf_path=${MDBCI_VM_PATH}/$name/cnf/mysql56/
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
eval "cat <<EOF
|
eval "cat <<EOF
|
||||||
$(<${script_dir}/templates/${template}.json.template)
|
$(<${script_dir}/templates/${template}.json.template)
|
||||||
" 2> /dev/null > ${MDBCI_VM_PATH}/${name}.json
|
" 2> /dev/null > ${MDBCI_VM_PATH}/${name}.json
|
||||||
|
|
||||||
${mdbci_dir}/mdbci --override --template ${MDBCI_VM_PATH}/${name}.json --repo-dir ${repo_dir} generate $name
|
${mdbci_dir}/mdbci --override --template ${MDBCI_VM_PATH}/${name}.json generate $name
|
||||||
|
|
||||||
|
mkdir ${MDBCI_VM_PATH}/$name/cnf
|
||||||
|
cp -r ${script_dir}/cnf/* ${MDBCI_VM_PATH}/$name/cnf/
|
||||||
|
|
||||||
|
|
||||||
while [ -f ~/vagrant_lock ]
|
while [ -f ~/vagrant_lock ]
|
||||||
do
|
do
|
||||||
|
|||||||
@ -43,8 +43,6 @@ done
|
|||||||
touch ${snapshot_lock_file}
|
touch ${snapshot_lock_file}
|
||||||
echo $JOB_NAME-$BUILD_NUMBER >> ${snapshot_lock_file}
|
echo $JOB_NAME-$BUILD_NUMBER >> ${snapshot_lock_file}
|
||||||
|
|
||||||
export repo_dir=$dir/repo.d/
|
|
||||||
|
|
||||||
${mdbci_dir}/mdbci snapshot revert --path-to-nodes $name --snapshot-name $snapshot_name
|
${mdbci_dir}/mdbci snapshot revert --path-to-nodes $name --snapshot-name $snapshot_name
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
@ -60,14 +58,11 @@ fi
|
|||||||
|
|
||||||
. ${script_dir}/set_env.sh "$name"
|
. ${script_dir}/set_env.sh "$name"
|
||||||
|
|
||||||
${mdbci_dir}/repository-config/maxscale-ci.sh $target repo.d
|
|
||||||
|
|
||||||
|
|
||||||
${mdbci_dir}/mdbci sudo --command 'yum remove maxscale -y' $name/maxscale
|
${mdbci_dir}/mdbci sudo --command 'yum remove maxscale -y' $name/maxscale
|
||||||
${mdbci_dir}/mdbci sudo --command 'yum clean all' $name/maxscale
|
${mdbci_dir}/mdbci sudo --command 'yum clean all' $name/maxscale
|
||||||
|
|
||||||
${mdbci_dir}/mdbci setup_repo --product maxscale $name/maxscale --repo-dir $repo_dir
|
${mdbci_dir}/mdbci setup_repo --product maxscale_ci --product-version ${target} $name/maxscale
|
||||||
${mdbci_dir}/mdbci install_product --product maxscale $name/maxscale --repo-dir $repo_dir
|
${mdbci_dir}/mdbci install_product --product maxscale_ci $name/maxscale
|
||||||
|
|
||||||
checkExitStatus $? "Error installing Maxscale" $snapshot_lock_file
|
checkExitStatus $? "Error installing Maxscale" $snapshot_lock_file
|
||||||
|
|
||||||
@ -79,11 +74,12 @@ make
|
|||||||
./check_backend --restart-galera
|
./check_backend --restart-galera
|
||||||
|
|
||||||
checkExitStatus $? "Failed to check backends" $snapshot_lock_file
|
checkExitStatus $? "Failed to check backends" $snapshot_lock_file
|
||||||
|
ulimit -c unlimited
|
||||||
ctest $test_set -VV -D Nightly
|
ctest $test_set -VV -D Nightly
|
||||||
|
cp core.* ${logs_publish_dir}
|
||||||
${script_dir}/copy_logs.sh
|
${script_dir}/copy_logs.sh
|
||||||
|
|
||||||
|
|
||||||
# Removing snapshot_lock
|
# Removing snapshot_lock
|
||||||
rm ${snapshot_lock_file}
|
rm ${snapshot_lock_file}
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,8 @@
|
|||||||
"hostname" : "maxscale",
|
"hostname" : "maxscale",
|
||||||
"box" : "centos_7_aws_large",
|
"box" : "centos_7_aws_large",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale_ci",
|
||||||
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -222,7 +222,8 @@
|
|||||||
"hostname" : "maxscale",
|
"hostname" : "maxscale",
|
||||||
"box" : "centos_7_aws_large",
|
"box" : "centos_7_aws_large",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale_ci",
|
||||||
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,7 +110,8 @@
|
|||||||
"box" : "${box}",
|
"box" : "${box}",
|
||||||
"memory_size" : "${vm_memory}",
|
"memory_size" : "${vm_memory}",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale_ci",
|
||||||
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,8 @@
|
|||||||
"box" : "${box}",
|
"box" : "${box}",
|
||||||
"memory_size" : "${vm_memory}",
|
"memory_size" : "${vm_memory}",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale_ci",
|
||||||
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,7 +60,8 @@
|
|||||||
"box" : "###box###",
|
"box" : "###box###",
|
||||||
"memory_size" : "2048",
|
"memory_size" : "2048",
|
||||||
"product" : {
|
"product" : {
|
||||||
"name": "maxscale"
|
"name" : "maxscale_ci",
|
||||||
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user