diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..29a73cdd --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +pipeline { + agent any + stages { + stage("检出") { + steps { + checkout([ + $class: 'GitSCM', + branches: [[name: env.GIT_BUILD_REF]], + userRemoteConfigs: [[ + url: env.GIT_REPO_URL, + credentialsId: env.CREDENTIALS_ID + ]]]) + } + } + stage('自定义构建过程') { + steps { + echo "自定义构建过程开始" + // 请在此处补充您的构建过程 + sh 'ls -l' + sh'echo hello coding>test.txt' + sh 'ls -l' + } + } + } +} diff --git a/test.py b/test.py new file mode 100644 index 00000000..65ef7fc6 --- /dev/null +++ b/test.py @@ -0,0 +1,4 @@ +def print(): + a = 1 + b = 2 + return "hello coding"