ci: set test step in ci when tdgpt file changed
This commit is contained in:
parent
0755bf85e0
commit
601d2f1c08
11
Jenkinsfile2
11
Jenkinsfile2
|
@ -6,6 +6,7 @@ node {
|
|||
file_zh_changed = ''
|
||||
file_en_changed = ''
|
||||
file_no_doc_changed = '1'
|
||||
file_only_tdgpt_change_except = '1'
|
||||
def abortPreviousBuilds() {
|
||||
def currentJobName = env.JOB_NAME
|
||||
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
||||
|
@ -73,6 +74,14 @@ def check_docs(){
|
|||
''',
|
||||
returnStdout: true
|
||||
).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_en_changed: ${file_en_changed}"
|
||||
echo "file_no_doc_changed: ${file_no_doc_changed}"
|
||||
|
@ -570,6 +579,7 @@ 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 + '''
|
||||
'''
|
||||
} else {
|
||||
if ( file_only_tdgpt_change_except != '' ) {
|
||||
sh '''
|
||||
cd ${WKC}/tests/parallel_test
|
||||
export DEFAULT_RETRY_TIME=2
|
||||
|
@ -580,6 +590,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
timeout(time: 15, unit: 'MINUTES'){
|
||||
script {
|
||||
|
|
|
@ -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