From 472a83322f55581e46d2670b524630bd6fd640d5 Mon Sep 17 00:00:00 2001 From: aozima Date: Tue, 14 Jul 2020 15:26:27 +0800 Subject: [PATCH 1/6] =?UTF-8?q?Jenkins=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..a53930641d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,14 @@ +pipeline { + agent any + stages { + stage('Build') { + steps { + sh 'echo "Hello World"' + sh ''' + echo "Multiline shell steps works too" + ls -lah + ''' + } + } + } +} -- Gitee From a04096c7afeae2268931a5193ef06546063a65ad Mon Sep 17 00:00:00 2001 From: aozima Date: Wed, 15 Jul 2020 09:34:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index a53930641d..f188c6ef20 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { stage('Build') { steps { sh 'echo "Hello World"' + sh 'echo "Hello World2"' sh ''' echo "Multiline shell steps works too" ls -lah -- Gitee From b872cacb8eccfdc1098cc11671d05ffd0092fd08 Mon Sep 17 00:00:00 2001 From: aozima Date: Wed, 15 Jul 2020 09:53:46 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E4=BD=BF=E7=94=A8docker?= =?UTF-8?q?=E6=9D=A5=E8=BF=90=E8=A1=8CCI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f188c6ef20..742a8632cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,9 @@ pipeline { - agent any + agent { + docker { + image 'ubuntu_ci:latest' + } + } stages { stage('Build') { steps { -- Gitee From 8f44251f897b0219bbca88c22abea56b192c4d72 Mon Sep 17 00:00:00 2001 From: aozima Date: Wed, 15 Jul 2020 09:55:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=B1=87=E6=8A=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 742a8632cf..d4181311d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,4 +16,24 @@ pipeline { } } } + 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}]""") + } + } } -- Gitee From daf434b87e944f4e4e793feb5c1fc6411063098d Mon Sep 17 00:00:00 2001 From: aozima Date: Wed, 15 Jul 2020 11:08:36 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index d4181311d1..216d88df91 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,8 @@ pipeline { steps { sh 'echo "Hello World"' sh 'echo "Hello World2"' + sh 'curl -v http://download.rt-thread.com/test.txt' + sh 'curl -v http://download.rt-thread.com/download/test.txt' sh ''' echo "Multiline shell steps works too" ls -lah -- Gitee From 35de1b765185917e98f87102204e4b9023b17679 Mon Sep 17 00:00:00 2001 From: aozima Date: Wed, 15 Jul 2020 11:17:44 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 216d88df91..7f82986fcc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,8 +9,8 @@ pipeline { steps { sh 'echo "Hello World"' sh 'echo "Hello World2"' - sh 'curl -v http://download.rt-thread.com/test.txt' - sh 'curl -v http://download.rt-thread.com/download/test.txt' + 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 -- Gitee