remove trailing whitespaces from MDBCI scripts

This commit is contained in:
Timofey Turenko
2018-03-29 15:51:36 +03:00
parent 7be55a77bb
commit fa41ca28e2
8 changed files with 29 additions and 30 deletions

View File

@ -4,7 +4,7 @@ MDBCI is a tool to manage virtual machines (VM). VM can be described in
the simple JSON format.
JSON templates can be found in [BUILD/mdbci/templates](templates)
MDBCI_VM_PATH have to be set before executing any MDBCI commands.
MDBCI_VM_PATH have to be set before executing any MDBCI commands.
This variable points to the directory to store 'Vagrantfile's
for all VMs as well as all additional files (e.g. *network_config)
@ -18,7 +18,7 @@ Installation instructions: [PREPARATION_FOR_MDBCI](https://github.com/mariadb-co
[BUILD/mdbci/build.sh](build.sh) prepares VM, executes Maxscale build and creates binary RPM or DEB repository.
Build options can be defined in the environmental variables. For variables descriptions and default values see
Build options can be defined in the environmental variables. For variables descriptions and default values see
comments in the [BUILD/mdbci/build.sh](build.sh) and [BUILD/mdbci/set_build_variables.sh](set_build_variables.sh)
Script does not store build log, please use ```stdout``` and ```stderr``` redirection to store log.
@ -37,7 +37,7 @@ By default VM will not stay alive after the build. Please use ```export do_not_d
to prevent VM from being destroyed. In this case VM have to be destroyed manually by ```mdbci destroy```
command.
VM will be created in ```$HOME/vms directory```, binary repository will be created the in
VM will be created in ```$HOME/vms directory```, binary repository will be created the in
```$HOME/repository/``` directory.
The name of binary repository sub-directory is generated based on source default
branch name and current date and time.
@ -56,7 +56,7 @@ If this command exits with success ('0') upgrade test reports PASSED.
## Build with AWS VM
To build using AWS VM it is necessary to configure AWS credentials and install `vagrant-aws` plugin.
AWS credentials have to be configured in the $HOME/.aws directory as described in the
AWS credentials have to be configured in the $HOME/.aws directory as described in the
[AWS CLI documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)
## Example of build
@ -71,8 +71,8 @@ export box="ubuntu_xenial_libvirt"
# examples:
# source="refs/tags/2.1.1" - tag "2.1.1"
# source="refs/heads/develop" - "develop" branch
# source="2.1" - can be branch or tag "2.1"
# (use refs/tags and refs/heads if there are
# source="2.1" - can be branch or tag "2.1"
# (use refs/tags and refs/heads if there are
# both tag "2.1" and branch "2.1")
# source="816983691af8fbded1b2b06a8c19e02587a54f32" - commit ID
export source="2.2"
@ -83,4 +83,3 @@ export target="2.1-2018Jan10"
cd BUILD/mdbci
./build.sh
```

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Copyies repo from ${unsorted_repo_dir}/$target/$box to
# Copyes repo from ${unsorted_repo_dir}/$target/$box to
dir=`pwd`
if [ "$box_type" == "RPM" ] ; then

View File

@ -2,7 +2,7 @@
# Creates RPM or DEB repository for biniries from
# $pre_repo_dir/$target/$box, signs it with keys
# from ${gpg_keys_path} and puts signed repo to
# from ${gpg_keys_path} and puts signed repo to
set -x

View File

@ -41,7 +41,7 @@ if [ $z_res -eq 127 ] && [ $y_res -eq 127 ] ; then
mkdir -p dists/$dist_name/main/binary-i386/
dpkg-scanpackages dists/$dist_name/main/binary-i386/ /dev/null | gzip -9c > dists/$dist_name/main/binary-i386/Packages.gz
gunzip -c dists/$dist_name/main/binary-i386/Packages.gz > dists/$dist_name/main/binary-i386/Packages
# else
# else
# echo "Architectures: ppc64el" >> dists/$dist_name/main/$arch/Release
fi
archs=`ls -1 dists/$dist_name/main | sed "s/binary-//" | tr '\n' ' '`
@ -55,7 +55,7 @@ if [ $z_res -eq 127 ] && [ $y_res -eq 127 ] ; then
exit 1
fi
gpg -abs --digest-algo sha256 -o dists/$dist_name/Release.gpg dists/$dist_name/Release
gpg -abs --digest-algo sha256 -o dists/$dist_name/Release.gpg dists/$dist_name/Release
if [ $? != 0 ] ; then
echo "Package signing failed!"
exit 1
@ -72,19 +72,19 @@ else
echo "%_signature gpg" >> ~/.rpmmacros
echo "%_gpg_name MariaDB Maxscale <maxscale@googlegroups.com>" >> ~/.rpmmacros
echo "\r" | setsid rpm --resign $sourcedir/*.rpm
if [ $? != 0 ] ; then
echo "Package signing failed!"
exit 1
fi
cp $sourcedir/* $destdir/
pushd ${destdir} >/dev/null 2>&1
createrepo -d -s sha .
if [ $? != 0 ] ; then
echo "Repo creation failed!"
exit 1
fi
fi
popd >/dev/null 2>&1
gpg --output repomd.xml.key --sign $destdir/repodata/repomd.xml

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Copyies stuff to VM, run build on VM and copies binaries
# Copyies stuff to VM, run build on VM and copies binaries
# to $pre_repo_dir/$target/$box
set -x
@ -17,7 +17,7 @@ ssh $sshopt "sudo rm -rf $work_dir"
echo "copying stuff to $image machine"
ssh $sshopt "mkdir -p $work_dir"
rsync -avz --delete -e "ssh $scpopt" ${script_dir}/../../ $sshuser@$IP:./$work_dir/
rsync -avz --delete -e "ssh $scpopt" ${script_dir}/../../ $sshuser@$IP:./$work_dir/
if [ $? -ne 0 ] ; then
echo "Error copying stuff to $box machine"
exit 2

View File

@ -23,7 +23,7 @@ export source=${scm_source}
export source=${source:-"$branch"}
echo "source=$source"
#hack to get rid of Jenkins artifacts
#hack to get rid of Jenkins artifacts
export target=`echo $target | tr -cd "[:print:]" | sed "s/?//g" | sed "s/ //g"`
export target=${target:-"$source-$curr_date"}

View File

@ -37,7 +37,7 @@ ${mdbci_dir}/repository-config/generate_all.sh repo.d
${mdbci_dir}/repository-config/maxscale-release.sh $old_target repo.d
# 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 --repo-dir $dir/repo.d generate $name
${mdbci_dir}/mdbci up $name --attempts=1
if [ $? != 0 ] ; then
if [ $? != 0 ] ; then
@ -101,7 +101,7 @@ do
sleep 5
ssh $sshopt $maxadmin_command
maxadm_exit=$?
if [ $maxadm_exit == 0 ] ; then
if [ $maxadm_exit == 0 ] ; then
break
fi
done

View File

@ -1,11 +1,11 @@
# Running Maxscale system tests on Virtual Machines with MDBCI
MDBCI is a tool to manage virtual machines (VMs).
MDBCI is a tool to manage virtual machines (VMs).
VMs can be described in the simple JSON format.
JSON templates for test configuration can be found in
[maxscale-system-test/mdbci/templates/](templates/)
'MDBCI_VM_PATH' have to be set before executing any MDBCI commands.
'MDBCI_VM_PATH' have to be set before executing any MDBCI commands.
This variable points to the directory to store 'Vagrantfile's
for all VMs as well as all additional files (e.g. *network_config)
@ -17,7 +17,7 @@ Installation instructions: [PREPARATION_FOR_MDBCI](https://github.com/mariadb-co
## Basics of test setup
Test setup is described in template. Templates are stored in
Test setup is described in template. Templates are stored in
[maxscale-system-test/mdbci/templates/](templates/)
Own template have to be put to the same directory.
@ -44,13 +44,13 @@ Template can contain references to any environmental variables - they all
will be replaced with values before VMs starting
The [maxscale-system-test/mdbci/run_test.sh](run_test.sh) script
brings test VMs configuration up and tries to execute
brings test VMs configuration up and tries to execute
```maxscale-system-test``` using 'ctest'.
Script can be executed without any parameters and without defining any
environmental variables.
Script can be executed without any parameters and without defining any
environmental variables.
In this case, tests will be executed for CentOS 7, MariaDB 10.2 and
Maxscale from current 'develop' repository
Maxscale from current 'develop' repository
[http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/](http://max-tst-01.mariadb.com/ci-repository/develop/mariadb-maxscale/)
VMs will not be destroyed after the tests.
@ -73,7 +73,7 @@ Variable name|Meaning
```name```|The name of test run - any string to identify VMs set|
For complete list of environmental variables see comments in
For complete list of environmental variables see comments in
[maxscale-system-test/mdbci/run_test.sh](run_test.sh)
and file [maxscale-system-test/mdbci/set_run_test_variables.sh](set_run_test_variables.sh)
@ -92,7 +92,7 @@ test_set|Meaning
If ```galera_version``` is not defined the value of ```version``` is used also for Galera backend
### Test execution
### Test execution
After execution of 'run_test.sh` by default VMs stay alive and other tests can be executed.
@ -100,7 +100,7 @@ Test use environmental variables to get all infio about test setup (about VMs).
The script [maxscale-system-test/mdbci/set_env.sh](set_env.sh)
loads all needed values (IPs, paths to ssh keyfiles,
user names, etc) into environmental variables. Script uses
user names, etc) into environmental variables. Script uses
data from ```${MDBCI_VM_PATH}/${name}_network_config``` file
and also calls MDBCI commands.
@ -168,7 +168,7 @@ To restore backend separatelly and for intial backend setup check_backend' can b
'run_test.sh' makes snapshot of all VMs before tests. The name of snapshot is 'clean'.
In case of problem, after 'snapshot revert' it is recommended to re-create
${name}_network_config file, re-load environmental variables and run
${name}_network_config file, re-load environmental variables and run
'check_backend'
```bash