Share only identity and allure in separate volume

- Sharing only the identity file removes the need for clearing the skill
sandbox dir and padatious cache
- Make things a bit cleaner with separate Allure volume
pull/2506/head
Åke Forslund 2020-02-20 15:40:23 +01:00
parent 5bcc533583
commit 12f2e63cc3
2 changed files with 8 additions and 12 deletions

13
Jenkinsfile vendored
View File

@ -33,10 +33,11 @@ pipeline {
timeout(time: 10, unit: 'MINUTES') timeout(time: 10, unit: 'MINUTES')
{ {
sh 'docker run \ sh 'docker run \
-v "$HOME/voight-kampff:/root/.mycroft" \ -v "$HOME/voight-kampff/identity:/root/.mycroft/identity" \
mycroft-core:${BRANCH_ALIAS} -f \ -v "$HOME/voight-kampff/:/root/allure" \
allure_behave.formatter:AllureFormatter \ mycroft-core:${BRANCH_ALIAS} \
-o /root/.mycroft/allure-result --tags ~@xfail' -f allure_behave.formatter:AllureFormatter \
-o /root/allure/allure-result --tags ~@xfail'
} }
} }
post { post {
@ -44,11 +45,11 @@ pipeline {
echo 'Report Test Results' echo 'Report Test Results'
echo 'Changing ownership...' echo 'Changing ownership...'
sh 'docker run \ sh 'docker run \
-v "$HOME/voight-kampff:/root/.mycroft" \ -v "$HOME/voight-kampff/:/root/allure" \
--entrypoint=/bin/bash \ --entrypoint=/bin/bash \
mycroft-core:${BRANCH_ALIAS} \ mycroft-core:${BRANCH_ALIAS} \
-x -c "chown $(id -u $USER):$(id -g $USER) \ -x -c "chown $(id -u $USER):$(id -g $USER) \
-R /root/.mycroft/allure-result"' -R /root/allure/"'
echo 'Transfering...' echo 'Transfering...'
sh 'mv $HOME/voight-kampff/allure-result allure-result' sh 'mv $HOME/voight-kampff/allure-result allure-result'

View File

@ -14,11 +14,6 @@ behave $@
RESULT=$? RESULT=$?
# Stop all mycroft core services. # Stop all mycroft core services.
/opt/mycroft/mycroft-core/stop-mycroft.sh all /opt/mycroft/mycroft-core/stop-mycroft.sh all
# Make the jenkins user the owner of the allure results. This allows the
# jenkins job to build a report from the results
# Remove temporary skill files
rm -rf ~/.mycroft/skills
# Remove intent cache
rm -rf ~/.mycroft/intent_cache
# Reort the result of the behave test as exit status
exit $RESULT exit $RESULT