Update 'bacillus/ci_pushbuild.sh'

This commit is contained in:
Russtopia 2020-08-21 19:47:37 -07:00
parent 61b7a80e00
commit 611b6853b2
1 changed files with 20 additions and 1 deletions

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
#
## bacillus (https://gogs.blitter.com/Russtopia/bacillus) build/test CI script
export GOPATH="${HOME}/go" export GOPATH="${HOME}/go"
export PATH=/usr/local/bin:/usr/bin:/usr/lib/ccache/bin:/bin:$GOPATH/bin export PATH=/usr/local/bin:/usr/bin:/usr/lib/ccache/bin:/bin:$GOPATH/bin
@ -22,15 +24,21 @@ echo "Building most recent push on branch $branch"
git checkout "$branch" git checkout "$branch"
ls ls
############
stage "Build" stage "Build"
############
make all make all
############
stage "UnitTests" stage "UnitTests"
############
go test -v . go test -v .
############
stage "Test(Authtoken)" stage "Test(Authtoken)"
############
echo "Clearing test user $USER ~/.xs_id file ..." echo "Clearing test user $USER ~/.xs_id file ..."
rm -f ~/.xs_id mv ~/.xs_id ~/.xs_id.bak
echo "Setting dummy authtoken in ~/.xs_id ..." echo "Setting dummy authtoken in ~/.xs_id ..."
echo "localhost:asdfasdfasdf" >~/.xs_id echo "localhost:asdfasdfasdf" >~/.xs_id
echo "Performing remote command on @localhost via authtoken login ..." echo "Performing remote command on @localhost via authtoken login ..."
@ -42,8 +50,11 @@ else
echo "client cmd performed OK." echo "client cmd performed OK."
unset tokentest unset tokentest
fi fi
mv ~/.xs_id.bak ~/.xs_id
############
stage "Test(S->C)" stage "Test(S->C)"
############
echo "Testing secure copy from server -> client ..." echo "Testing secure copy from server -> client ..."
tmpdir=$$ tmpdir=$$
mkdir -p /tmp/$tmpdir mkdir -p /tmp/$tmpdir
@ -63,17 +74,25 @@ else
exit $stat exit $stat
fi fi
############
stage "Test(C->S)" stage "Test(C->S)"
############
echo "TODO ..." echo "TODO ..."
############
stage "Lint" stage "Lint"
############
make lint make lint
############
stage "Artifacts" stage "Artifacts"
############
echo -n "Creating tarfile ..." echo -n "Creating tarfile ..."
tar -cz --exclude=.git --exclude=cptest -f ${BACILLUS_ARTFDIR}/xs.tgz . tar -cz --exclude=.git --exclude=cptest -f ${BACILLUS_ARTFDIR}/xs.tgz .
############
stage "Cleanup" stage "Cleanup"
############
rm -f ~/.xs_id rm -f ~/.xs_id
echo echo