You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
6543 dffe27c635
continuous-integration/woodpecker the build failed Details
Regognize "CI_*" EnvVars (#6)
1 year ago
.github Add probot settings config 4 years ago
docker Update README.md and related for new image location (#2) 1 year ago
.dockerignore Added dockerignore 5 years ago
.gitignore update dependencys 2 years ago
.woodpecker.yml Update README.md and related for new image location (#2) 1 year ago
LICENSE Fixed license indentation 7 years ago
Makefile Release images via CI (#1) 1 year ago
README.md Update README.md and related for new image location (#2) 1 year ago
go.mod Upgrade urfave/cli to v2 (#5) 1 year ago
go.sum Upgrade urfave/cli to v2 (#5) 1 year ago
main.go Regognize "CI_*" EnvVars (#6) 1 year ago
pipeline.libsonnet Fix microbadger settings and enable auto_tag for manifest 4 years ago
plugin.go add backoff to the git plugin 5 years ago
plugin_test.go fix test 2 years ago
types.go add backoff to the git plugin 5 years ago
utils.go Revert "Use commit SHA on PR builds" 5 years ago
utils_test.go codegangsta cli for env 7 years ago

README.md

plugin-git

Woodpecker/Drone plugin to clone git repositories. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/plugin-git

Docker

Build the Docker image with the following command:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/Dockerfile.linux.amd64 --tag woodpeckerci/plugin-git .

Usage

Clone a commit:

docker run --rm \
  -e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
  -e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \
  -e DRONE_BUILD_EVENT=push \
  -e DRONE_COMMIT_SHA=d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab \
  -e DRONE_COMMIT_REF=refs/heads/master \
  woodpeckerci/plugin-git

Clone a pull request:

docker run --rm \
  -e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
  -e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \
  -e DRONE_BUILD_EVENT=pull_request \
  -e DRONE_COMMIT_SHA=3b4642018d177bf5fecc5907e7f341a2b5c12b8a \
  -e DRONE_COMMIT_REF=refs/pull/74/head \
  woodpeckerci/plugin-git

Clone a tag:

docker run --rm \
  -e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
  -e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \
  -e DRONE_BUILD_EVENT=tag \
  -e DRONE_COMMIT_SHA=3b4642018d177bf5fecc5907e7f341a2b5c12b8a \
  -e DRONE_COMMIT_REF=refs/tags/74/head \
  woodpeckerci/plugin-git