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