N
N
Nikolay Baranenko2018-07-11 14:48:04
go
Nikolay Baranenko, 2018-07-11 14:48:04

How to connect dependencies from Vendor during assembly?

Hello.
Wrote code in GOLang.
I tested it on my developer computer, it starts up and works.
Uploaded the source to git.
Now I want to make a CI_CD (Gitlab/Jenkins/Artifactory) with uploading to the desired server.
The project has a number of dependencies
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"github.com/prometheus/common/version"
"gopkg.in/alecthomas/kingpin.v2"
which you need to connect before starting the build
5b45ed30d7b2c311744208.jpeg
How to correctly write these dependencies in the jenkinsfile

stage ('Dependencies') {
                            echo 'Pulling Dependencies'

                            sh  """
            go version
            """
//            go get -u github.com/prometheus/client_golang/prometheus
                }
                stage ('Build') {
//                    sh "go build -o haproxy_node_exporter gitlabserver/examples/haproxy_node_exporter"
                }
            }
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
m0nym, 2018-07-11
@drno-reg

just
dep ensure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question