forked from paroksh/govwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab1
39 lines (34 loc) · 1.15 KB
/
Lab1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
pipeline {
agent any
stages {
stage('Checkout'){
agent {
docker {
image 'golang'
args ' -u 0 -v ${WORKSPACE}:/go/src/govwa:rw'
}
}
steps {
git(url: 'https://github.com/snehakokil/govwa.git', branch: 'master')
stash name:'dockerfile', includes: '**/Dockerfile'
}
}//stage
stage('Build') {
agent {
docker {
image 'golang'
args ' -u 0 -v ${WORKSPACE}:/go/src/govwa:rw'
}
}
steps {
sh 'cd /go/src'
sh 'go get github.com/go-sql-driver/mysql'
sh 'go get github.com/gorilla/sessions'
sh 'go get github.com/julienschmidt/httprouter'
// Build the app.
sh 'go build'
stash name:'CompiledSource', includes:'**/**'
}
}
} //stages
}//pipeline