add: testing stuff for drone
This commit is contained in:
parent
8d0451a9b3
commit
ddf5afb167
2 changed files with 31 additions and 22 deletions
|
@ -2,13 +2,19 @@ kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: download
|
||||||
|
image: plugins/download
|
||||||
|
settings:
|
||||||
|
source: http://vmi366681.contaboserver.net:6423/archive/emgauwa-controller-testing/6/controller
|
||||||
|
destination: /drone/controller
|
||||||
|
- name: test
|
||||||
image: serguzim/emgauwa-builder
|
image: serguzim/emgauwa-builder
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
- export EMGAUWA_CONTROLLER_EXE=/drone/controller
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
|
@ -15,25 +15,28 @@ cd $working_dir
|
||||||
|
|
||||||
target_branch=$(git rev-parse --abbrev-ref HEAD)
|
target_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
git clone --quiet ssh://git@git.serguzim.me:3022/emgauwa/controller.git controller || exit
|
if [ -z "$EMGAUWA_CONTROLLER_EXE" ]
|
||||||
pushd ./controller > /dev/null
|
then
|
||||||
|
git clone --quiet ssh://git@git.serguzim.me:3022/emgauwa/controller.git controller || exit
|
||||||
|
cd ./controller
|
||||||
|
|
||||||
git checkout dev >/dev/null 2>&1
|
git checkout dev >/dev/null 2>&1
|
||||||
git checkout $target_branch >/dev/null 2>&1
|
git checkout $target_branch >/dev/null 2>&1
|
||||||
git checkout $2 >/dev/null 2>&1
|
git checkout $2 >/dev/null 2>&1
|
||||||
|
|
||||||
echo "Building controller on branch $(git rev-parse --abbrev-ref HEAD)"
|
echo "Building controller on branch $(git rev-parse --abbrev-ref HEAD)"
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
cmake -DWIRING_PI_DEBUG=on .. >/dev/null
|
cmake -DWIRING_PI_DEBUG=on .. >/dev/null
|
||||||
cp $source_dir/controller.testing.ini ./controller.ini
|
make >/dev/null
|
||||||
make >/dev/null
|
EMGAUWA_CONTROLLER_EXE=./controller
|
||||||
|
fi
|
||||||
|
|
||||||
./controller start >$working_dir/controller.log 2>&1 &
|
$EMGAUWA_CONTROLLER_EXE start -c $source_dir/controller.testing.ini >$working_dir/controller.log 2>&1 &
|
||||||
controller_id=$!
|
controller_id=$!
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
|
cd $working_dir
|
||||||
|
|
||||||
cp $1 $working_dir/core
|
cp $1 $working_dir/core
|
||||||
cp $source_dir/core.testing.ini $working_dir/core.ini
|
cp $source_dir/core.testing.ini $working_dir/core.ini
|
||||||
|
|
Loading…
Reference in a new issue