ci: set test step in ci when tdgpt file changed
This commit is contained in:
parent
0755bf85e0
commit
601d2f1c08
23
Jenkinsfile2
23
Jenkinsfile2
|
@ -6,6 +6,7 @@ node {
|
||||||
file_zh_changed = ''
|
file_zh_changed = ''
|
||||||
file_en_changed = ''
|
file_en_changed = ''
|
||||||
file_no_doc_changed = '1'
|
file_no_doc_changed = '1'
|
||||||
|
file_only_tdgpt_change_except = '1'
|
||||||
def abortPreviousBuilds() {
|
def abortPreviousBuilds() {
|
||||||
def currentJobName = env.JOB_NAME
|
def currentJobName = env.JOB_NAME
|
||||||
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
||||||
|
@ -73,6 +74,14 @@ def check_docs(){
|
||||||
''',
|
''',
|
||||||
returnStdout: true
|
returnStdout: true
|
||||||
).trim()
|
).trim()
|
||||||
|
|
||||||
|
file_only_tdgpt_change_except = sh (
|
||||||
|
script: '''
|
||||||
|
cat ${file_no_doc_changed} |grep -v "forecastoperator.c\\|anomalywindowoperator.c" || :
|
||||||
|
''',
|
||||||
|
returnStdout: true
|
||||||
|
).trim()
|
||||||
|
|
||||||
echo "file_zh_changed: ${file_zh_changed}"
|
echo "file_zh_changed: ${file_zh_changed}"
|
||||||
echo "file_en_changed: ${file_en_changed}"
|
echo "file_en_changed: ${file_en_changed}"
|
||||||
echo "file_no_doc_changed: ${file_no_doc_changed}"
|
echo "file_no_doc_changed: ${file_no_doc_changed}"
|
||||||
|
@ -570,12 +579,14 @@ pipeline {
|
||||||
''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t tdgpt_cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + '''
|
''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t tdgpt_cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + '''
|
||||||
'''
|
'''
|
||||||
} else {
|
} else {
|
||||||
sh '''
|
if ( file_only_tdgpt_change_except != '' ) {
|
||||||
cd ${WKC}/tests/parallel_test
|
sh '''
|
||||||
export DEFAULT_RETRY_TIME=2
|
cd ${WKC}/tests/parallel_test
|
||||||
date
|
export DEFAULT_RETRY_TIME=2
|
||||||
''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + '''
|
date
|
||||||
'''
|
''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + '''
|
||||||
|
'''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import click
|
||||||
|
|
||||||
|
@click.command()
|
||||||
|
@click.option('--count', default=1, help='Number of greetings.')
|
||||||
|
@click.option('--name', prompt='Your name',
|
||||||
|
help='The person to greet.')
|
||||||
|
def hello(count, name):
|
||||||
|
"""Simple program that greets NAME for a total of COUNT times."""
|
||||||
|
for x in range(count):
|
||||||
|
click.echo('Hello %s!' % name)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
hello()
|
Loading…
Reference in New Issue