Sign inSign up

jerray/drone-go-mod

By jerray

•Updated over 7 years ago

Drone plugin to download dependencies for Golang project

Image
0

6.4K

jerray/drone-go-mod repository overview

⁠Drone Go Mod

Drone plugin for downloading dependencies of Golang project.

This plugin downloads all dependencies described by go.mod file and then makes vendored copy of them.

You can use git_private_key setting to provide private key if you have private dependencies. If private key is provided, this plugin will configure git to clone repositories using SSH instead of HTTPS.

By default the SSH fingerprints of github.com and bitbucket.com is written in the known_hosts file when building this docker image. If your private git repositories is located at other sites, use git_server_hosts setting to specify them.

⁠Pipeline Example

kind: pipeline
name: default

steps:
- name: vendor
  image: jerray/drone-go-mod:latest
  settings:
    git_private_key:
      from_secret: github_private_key
    git_server_hosts:
    - gitlab.com
    - gitea.com

- name: build
  image: golang:1.12-alpine
  commands:
  - go build -mod vendor

⁠Licence

MIT

Tag summary

Content type

Image

Digest

Size

132 MB

Last updated

over 7 years ago

docker pull jerray/drone-go-mod