Drone plugin to clone mercurial
repositories. For the usage information and a listing of the available options please take a look at the docs.
This plugin is responsible for cloning mercurial
repositories. It is capable
of cloning a specific commit, branch, tag or pull request. The clone path is
provided in the dir
field.
Build the binary using make
:
make deps build
./drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "push",
"branch": "master",
"commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
"ref": "refs/heads/master"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF
./drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "pull_request",
"branch": "master",
"commit": "8d6a233744a5dcacbf2605d4592a4bfe8b37320d",
"ref": "refs/pull/892/merge"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF
./drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "tag",
"branch": "master",
"commit": "339fb92b9629f63c0e88016fffb865e3e1055483",
"ref": "refs/tags/v0.2.0"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF
Build the container using make
:
make deps docker
docker run -i plugins/drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "push",
"branch": "master",
"commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
"ref": "refs/heads/master"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF
docker run -i plugins/drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "pull_request",
"branch": "master",
"commit": "8d6a233744a5dcacbf2605d4592a4bfe8b37320d",
"ref": "refs/pull/892/merge"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF
docker run -i plugins/drone-hg <<EOF
{
"repo": {
"clone_url": "https://[email protected]/drone/drone"
},
"build": {
# FIXME: How does it look with hg?
"event": "tag",
"branch": "master",
"commit": "339fb92b9629f63c0e88016fffb865e3e1055483",
"ref": "refs/tags/v0.2.0"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/bitbucket.org/drone/drone"
}
}
EOF