Test when

This commit is contained in:
Michael Hansen 2022-05-04 16:18:09 -04:00
commit d17ce3ac70

83
Jenkinsfile vendored
View file

@ -64,60 +64,61 @@ pipeline {
} }
script { script {
env.MIMIC3_TAG_NAME = sh(returnStdout: true, script: "git tag --sort=-creatordate | head -n 1").trim() // Get individual tags
env.PLUGIN_TAG_NAME = sh(returnStdout: true, script: "cd plugin-tts-mimic3 && git tag --sort=-creatordate | head -n 1").trim() env.MIMIC3_TAG_NAME = sh(
} returnStdout: true,
} script: "git tag --contains --sort=-creatordate | head -n 1"
} ).trim()
stage('test') { env.PLUGIN_TAG_NAME = sh(
steps { returnStdout: true,
echo "${env.MIMIC3_TAG_NAME}" script: "cd plugin-tts-mimic3 && git tag --contains --sort=-creatordate | head -n 1"
echo "${env.PLUGIN_TAG_NAME}" ).trim()
}
} }
} }
// Copy default voice // Copy default voice
// stage('Copy voices') { stage('Copy voices') {
// steps { steps {
// sh 'mkdir -p voices/${DEFAULT_VOICE}' sh 'mkdir -p voices/${DEFAULT_VOICE}'
// sh 'rsync -r --link-dest="${DEFAULT_VOICE_PATH}/${DEFAULT_VOICE}/" "${DEFAULT_VOICE_PATH}/${DEFAULT_VOICE}/" voices/${DEFAULT_VOICE}/' sh 'rsync -r --link-dest="${DEFAULT_VOICE_PATH}/${DEFAULT_VOICE}/" "${DEFAULT_VOICE_PATH}/${DEFAULT_VOICE}/" voices/${DEFAULT_VOICE}/'
// } }
// } }
// Build, test, and publish plugin distribution package to PyPI // Build, test, and publish plugin distribution package to PyPI
// stage('Plugin dist') { stage('Plugin dist') {
// steps { steps {
// sh 'make plugin-dist' sh 'make plugin-dist'
// } }
// } }
// Create a new tagged Github release with source distribution for Mycroft plugin // Create a new tagged Github release with source distribution for Mycroft plugin
// stage('Publish plugin') { stage('Publish plugin') {
// environment { environment {
// GITHUB_REPO = 'plugin-tts-mimic3' GITHUB_REPO = 'plugin-tts-mimic3'
// TAG_NAME = 'release/v0.2.0' TAG_NAME = 'release/v0.2.0'
// PLUGIN_VERSION = readFile(file: 'plugin-tts-mimic3/mycroft_plugin_tts_mimic3/VERSION').trim() PLUGIN_VERSION = readFile(file: 'plugin-tts-mimic3/mycroft_plugin_tts_mimic3/VERSION').trim()
// } }
// when { when {
// expression { expression {
// env.TAG_NAME.startsWith('release/') return env.PLUGIN_TAG_NAME.startsWith('foo/')
// } }
// } }
// steps { steps {
// // TODO: Publish to PyPI // TODO: Publish to PyPI
// // sh 'twine upload --skip-existing --user ${PYPI_USR} ${PYPI_PSW} dist/mycroft_plugin_tts_mimic3-${PLUGIN_VERSION}.tar.gz' // sh 'twine upload --skip-existing --user ${PYPI_USR} ${PYPI_PSW} dist/mycroft_plugin_tts_mimic3-${PLUGIN_VERSION}.tar.gz'
// // Delete release for tag, if it exists // Delete release for tag, if it exists
// sh 'scripts/delete-tagged-release.sh ${GITHUB_OWNER} ${GITHUB_REPO} ${TAG_NAME} ${GITHUB_PSW}' sh 'scripts/delete-tagged-release.sh ${GITHUB_OWNER} ${GITHUB_REPO} ${TAG_NAME} ${GITHUB_PSW}'
// // Create new tagged release and upload assets // Create new tagged release and upload assets
// sh 'scripts/create-tagged-release.sh ${GITHUB_OWNER} ${GITHUB_REPO} ${TAG_NAME} ${GITHUB_PSW}' + sh 'scripts/create-tagged-release.sh ${GITHUB_OWNER} ${GITHUB_REPO} ${TAG_NAME} ${GITHUB_PSW}' +
// ' dist/mycroft_plugin_tts_mimic3-${PLUGIN_VERSION}.tar.gz application/gzip' ' dist/mycroft_plugin_tts_mimic3-${PLUGIN_VERSION}.tar.gz application/gzip'
// } }
// } }
// Build, test, and publish source distribution packages to PyPI // Build, test, and publish source distribution packages to PyPI
// stage('Dist') { // stage('Dist') {