Skip to content
Snippets Groups Projects
Commit 675ebc16 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

add first staging build

parents
No related branches found
No related tags found
No related merge requests found
pipeline {
agent any
tools {
go 'go-1.16'
}
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')
}
stages {
stage('Checkout external proj') {
steps {
git branch: 'staging',
credentialsId: 'tucker-gitlab-login',
url: 'https://gitlab.cs.umd.edu/dawn/go-backend/dawn-gateway.git'
sh "ls -lat"
}
}
stage('build') {
steps {
sh """
/home/tucker.siegel/bin/dawn-cli build-image -p .
"""
}
}
stage('test') {
steps {
sh """
docker run -v `pwd`:`pwd` -w `pwd` dawn/dawn-gateway-dev sh -c "
go get github.com/axw/gocov/gocov
go get github.com/matm/gocov-html
go get github.com/AlekSi/gocov-xml
go test ./... -gcflags=-l -coverprofile coverage.out
gocov convert coverage.out | gocov-xml > coverage.xml
gocov convert coverage.out | gocov-html > coverage.html
"
"""
}
}
stage('redeploying backend services') {
steps {
sh """
cd /home/tucker.siegel/go/dawn-cli
/home/tucker.siegel/bin/dawn-cli redeploy
"""
}
}
}
post {
always {
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/coverage.xml', enableNewApi: true, failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 40, 60', maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment