diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000000000000000000000000000000..7f82986fcc46471485237fa340bb8a3ded7cdb0d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,41 @@ +pipeline { + agent { + docker { + image 'ubuntu_ci:latest' + } + } + stages { + stage('Build') { + steps { + sh 'echo "Hello World"' + sh 'echo "Hello World2"' + sh 'curl -v http://download.isrc.rt-thread.com/test.txt' + sh 'curl -v http://download.isrc.rt-thread.com/download/test.txt' + sh ''' + echo "Multiline shell steps works too" + ls -lah + ''' + } + } + } + post { + failure { + addGiteeMRComment(comment: """:x: Jenkins CI 构建失败。\n\n \ +查看更多日志详细信息: \ +Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}] \ +
\ +:x: The Jenkins CI build failed.\n\n \ +Results available at: \ +Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]""") + } + success { + addGiteeMRComment(comment: """:white_check_mark: Jenkins CI 构建通过。\n\n \ +查看更多日志详细信息: \ +Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}] \ +
\ +:white_check_mark: The Jenkins CI build passed.\n\n \ +Results available at: \ +Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]""") + } + } +}