drone-hg

command module
v0.0.0-...-6249e6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

README

drone-hg

Build Status Gitter chat Go Doc Go Report

Drone plugin to clone mercurial 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/drone-hg

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 plugins/hg .

Usage

Clone a commit:

docker run --rm \
  -e DRONE_REMOTE_URL=https://bitbucket.org/cedk/drone-hg-test \
  -e DRONE_WORKSPACE=/go/src/bitbucket.org/cedk/drone-hg-test \
  -e DRONE_BUILD_EVENT=push \
  -e DRONE_COMMIT_SHA=d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab \
  -e DRONE_COMMIT_REF=refs/heads/master \
  plugins/hg

Clone a pull request:

docker run --rm \
  -e DRONE_REMOTE_URL=https://bitbucket.org/cedk/drone-hg-test \
  -e DRONE_WORKSPACE=/go/src/bitbucket.org/cedk/drone-hg-test \
  -e DRONE_BUILD_EVENT=pull_request \
  -e DRONE_COMMIT_SHA=3b4642018d177bf5fecc5907e7f341a2b5c12b8a \
  -e DRONE_COMMIT_REF=refs/pull/74/head \
  plugins/hg

Clone a tag:

docker run --rm \
  -e DRONE_REMOTE_URL=https://bitbucket.org/cedk/drone-hg-test \
  -e DRONE_WORKSPACE=/go/src/bitbucket.org/cedk/drone-hg-test \
  -e DRONE_BUILD_EVENT=tag \
  -e DRONE_COMMIT_SHA=3b4642018d177bf5fecc5907e7f341a2b5c12b8a \
  -e DRONE_COMMIT_REF=refs/tags/74/head \
  plugins/hg

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL