From c207cdfc032f20dccefc7b41f5e9bb7175d40147 Mon Sep 17 00:00:00 2001 From: Tucker Siegel <tgsiegel@umd.edu> Date: Thu, 11 Nov 2021 12:06:02 -0800 Subject: [PATCH] add new staging code --- deploy/staging | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 deploy/staging diff --git a/deploy/staging b/deploy/staging new file mode 100644 index 0000000..2d84264 --- /dev/null +++ b/deploy/staging @@ -0,0 +1,47 @@ +pipeline { + agent any + tools { + go 'go-1.16' + } + steps { + git branch: 'staging', + credentialsId: 'tucker-gitlab-login', + url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-user.git' + + sh "ls -lat" + } + stages { + + stage('build new dawn-cli') { + git branch: 'main', + credentialsId: 'tucker-gitlab-login', + url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-cli/-/tree/main' + + sh """ + cd dawn-cli + go build + cp dawn-cli /home/tucker.siegel/bin/dawn-cli + cd .. + """ + } + + stage('teardown') { + sh """ + /home/tucker.siegel/bin/dawn-cli teardown + """ + } + + stage('cleanup old images') { + steps { + sh """ + docker rmi $(docker images | grep 'dawn-gateway-dev') + docker rmi $(docker images | grep 'dawn-user-dev') + docker rmi $(docker images | grep 'dawn-gdd-dev') + docker rmi $(docker images | grep 'crop-progress-tool-dev') + """ + } + } + + + } +} \ No newline at end of file -- GitLab