diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..9c22562 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,63 @@ +pipeline { + agent none + stages { + stage('Build Image With localhost') { + agent { label 'LocalHost' } // 在标签为'linux-build'的节点上执行 + steps { + script { + try { + echo 'Start Build' + sh 'docker compose -f docker-compose.yaml down' + sh 'docker compose -f docker-compose.yaml up -d --build' + echo 'Build success' + } catch (err) { + echo err.getMessage() + } + } + } + post { // 添加post指令处理阶段完成后的情况 + failure { + echo 'Build failed, but continuing to the next stage...' + } + } + } + stage('Build Image With rabbit') { + agent { label '流氓兔' } // 在标签为'linux-build'的节点上执行 + steps { + script { + try { + echo 'Start Build' + sh 'docker compose -f docker-compose.yaml up -d --build' + echo 'Build success' + } catch (err) { + echo err.getMessage() + } + } + } + post { // 添加post指令处理阶段完成后的情况 + failure { + echo 'Build failed, but continuing to the next stage...' + } + } + } + stage('Build Image With L') { + agent { label 'L' } // 在标签为'linux-build'的节点上执行 + steps { + script { + try { + echo 'Start Build' + sh 'docker compose -f docker-compose.yaml up -d --build' + echo 'Build success' + } catch (err) { + echo err.getMessage() + } + } + } + post { // 添加post指令处理阶段完成后的情况 + failure { + echo 'Build failed, but continuing to the next stage...' + } + } + } + } +} \ No newline at end of file diff --git a/consts/consts.go b/consts/consts.go index f13f0ee..57339de 100644 --- a/consts/consts.go +++ b/consts/consts.go @@ -1,15 +1,5 @@ package consts -/*************************************************** - ** @Desc : This file for ... - ** @Time : 2019/11/25 14:14 - ** @Author : yuebin - ** @File : consts.go - ** @Last Modified by : yuebin - ** @Last Modified time: 2019/11/25 14:14 - ** @Software: GoLand -****************************************************/ - const ( ACTIVE = "active" UNACTIVE = "unactive" diff --git a/go.mod b/go.mod index 7a4f197..f975078 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f github.com/go-redis/redis v6.14.2+incompatible github.com/go-sql-driver/mysql v1.6.0 - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/pkg/errors v0.9.1 github.com/rs/xid v1.3.0 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e diff --git a/go.sum b/go.sum index eccf39f..e410447 100644 --- a/go.sum +++ b/go.sum @@ -57,7 +57,6 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=