changed naming of docker image and added platform variable
@@ -4,16 +4,7 @@ pipeline {
// Running builds concurrently could cause a race condition with
// building the Docker image.
disableConcurrentBuilds()
- }
- environment {
- // Some branches have a "/" in their name (e.g. feature/new-and-cool)
- // Some commands, such as those tha deal with directories, don't
- // play nice with this naming convention. Define an alias for the
- // branch name that can be used in these scenarios.
- BRANCH_ALIAS = sh(
- script: 'echo $BRANCH_NAME | sed -e "s#/#_#g"',
- returnStdout: true
- ).trim()
+ buildDiscarder(logRotator(numToKeepStr: '5'))
}
stages {
// Run the build in the against the dev branch to check for compile errors
@@ -25,17 +16,30 @@ pipeline {
changeRequest target: 'dev'
}
}
+ environment {
+ // Some branches have a "/" in their name (e.g. feature/new-and-cool)
+ // Some commands, such as those tha deal with directories, don't
+ // play nice with this naming convention. Define an alias for the
+ // branch name that can be used in these scenarios.
+ BRANCH_ALIAS = sh(
+ script: 'echo $BRANCH_NAME | sed -e "s#/#_#g"',
+ returnStdout: true
+ ).trim()
+ }
steps {
- echo 'Building Test Docker Image'
+ echo 'Building Mark I Voight-Kampff Docker Image'
sh 'cp test/Dockerfile.test Dockerfile'
- sh 'docker build --target voight_kampff -t mycroft-core:${BRANCH_ALIAS} .'
- echo 'Running Tests'
+ sh 'docker build \
+ --target voight_kampff_builder \
+ --build-arg platform=mycroft_mark_1 \
+ -t voight-kampff-mark-1:${BRANCH_ALIAS} .'
+ echo 'Running Mark I Voight-Kampff Test Suite'
timeout(time: 60, unit: 'MINUTES')
{
sh 'docker run \
-v "$HOME/voight-kampff/identity:/root/.mycroft/identity" \
-v "$HOME/voight-kampff/:/root/allure" \
- mycroft-core:${BRANCH_ALIAS} \
+ voight-kampff-mark-1:${BRANCH_ALIAS} \
-f allure_behave.formatter:AllureFormatter \
-o /root/allure/allure-result --tags ~@xfail'
}
@@ -47,11 +51,11 @@ pipeline {
sh 'docker run \
-v "$HOME/voight-kampff/:/root/allure" \
--entrypoint=/bin/bash \
- mycroft-core:${BRANCH_ALIAS} \
+ voight-kampff-mark-1:${BRANCH_ALIAS} \
-x -c "chown $(id -u $USER):$(id -g $USER) \
-R /root/allure/"'
- echo 'Transfering...'
+ echo 'Transferring...'
sh 'rm -rf allure-result/*'
sh 'mv $HOME/voight-kampff/allure-result allure-result'
script {
