• Stars
    star
    268
  • Rank 153,144 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go client for the Drone API

drone-go

Go.dev

package main

import (
	"fmt"

	"github.com/drone/drone-go/drone"
	"golang.org/x/oauth2"
)

const (
	token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
	host  = "http://drone.company.com"
)

func main() {
	// create an http client with oauth authentication.
	config := new(oauth2.Config)
	auther := config.Client(
		oauth2.NoContext,
		&oauth2.Token{
			AccessToken: token,
		},
	)

	// create the drone client with authenticator
	client := drone.NewClient(host, auther)

	// gets the current user
	user, err := client.Self()
	fmt.Println(user, err)

	// gets the named repository information
	repo, err := client.Repo("drone", "drone-go")
	fmt.Println(repo, err)
}

Release procedure

Run the changelog generator.

docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret github token>

You can generate a token by logging into your GitHub account and going to Settings -> Personal access tokens.

Next we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.

Run the changelog generator again with the future version according to semver.

docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret token> --future-release v1.0.0

Create your pull request for the release. Get it merged then tag the release.

More Repositories

1

drone-ui

Front-end for the Drone continuous integration server
JavaScript
470
star
2

routes

[DEPRECATED] routing API for Go web applications
Go
340
star
3

envsubst

Go package emulates bash environment variable substitution
Go
270
star
4

drone-wall

Dashboard for the Drone CI server
JavaScript
260
star
5

go.stripe

a simple Credit Card processing library for Go using the Stripe API
Go
260
star
6

autoscaler

Automatically adds or removes instances based on build volume
Go
193
star
7

sqlgen

Go tool for generating sql scanners, sql statements and other helper functions
Go
183
star
8

go-scm

Package scm provides a unified interface to multiple source code management systems.
Go
172
star
9

charts

Helm charts for the Drone platform on Kubernetes
Go
168
star
10

jkl

[DEPRECATED] a static site generator written in Go based on Jekyll
Go
132
star
11

docs

Documentation for the Drone Continuous Integration project
SCSS
114
star
12

awesome-drone

A curated list of awesome Drone resources.
104
star
13

drone-plugin-index

Public index of Drone plugins
JavaScript
74
star
14

drone-gc

Garbage collection of unused docker resources
Go
73
star
15

drone-vault

Drone plugin for integrating with the Vault secrets manager
Go
64
star
16

drone-node

Node client for the Drone API
JavaScript
62
star
17

drone-runtime

[DEPRECATED] migrated to https://github.com/drone-runners
Go
62
star
18

drone-kaniko

Drone plugin for building and publishing Docker images
Go
56
star
19

drone-git

Drone plugin for cloning Git repositories
Go
53
star
20

drone-kubernetes-runtime

Goto drone/drone-runtime
Go
47
star
21

mq

a lightweight STOMP message broker
Go
42
star
22

drone-yaml

Go package for parsing and compiling the drone yaml file
Go
41
star
23

runner-go

Go helper package to extend Drone with customer runners.
Go
38
star
24

ca-certs

Docker image from scratch with root certificates
37
star
25

drone-plugin-starter

Starter project for creating Drone plugins
Go
34
star
26

drone-migrate

Migration utility from Drone 0.8.x to 1.0.x
Go
33
star
27

go-bitbucket

[DEPRECATED] Go bindings for the Bitbucket API
Go
28
star
28

go-login

Package login provides login handlers for multiple Source Control Management systems.
Go
28
star
29

drone-js

Javascript client for the Drone API
JavaScript
23
star
30

tutorials

Hugo project for the Drone tutorials website
CSS
20
star
31

homebrew-drone

Homebrew repository to install the Drone command line utility
Ruby
19
star
32

drone-convert-starlark

DEPRECATED: native Starlark support was added to Drone core. This extension is no longer required and has been deprecated.
Go
16
star
33

boilr-config

boilr template for creating Drone configuration extensions
Go
13
star
34

proposal

Drone Project Design Documents
13
star
35

drone-template-lib

library for generating templates in notification plugins
Go
13
star
36

hello-world

simple repository with CI enabled
Dockerfile
12
star
37

drone-registry-plugin

Registry extension for backward compatibility with 0.8 global registry credentials.
Go
12
star
38

docs.drone.io

[DEPRECATED] Documentation for Drone.io continuous integration service
CSS
12
star
39

drone-jsonnet-config

Drone extensions to support Jsonnet configuration files
Go
12
star
40

boilr-plugin

boilr template for creating Drone plugins
Go
11
star
41

drone-plugin-go

[DEPRECATED] use drone-go instead
Go
11
star
42

go-convert

Package convert provides tools for converting pipeline configuration files to the Drone format.
Go
11
star
43

drone-docker

Drone plugin for building and publishing Docker images
Go
9
star
44

boilr-metrics

boilr template for creating custom Drone metrics providers
Go
8
star
45

drone-cache-lib

library for building cache plugins
Go
8
star
46

brand

Logos and branding
8
star
47

drone-amazon-secrets

Drone plugin for integrating with the AWS Secrets Manager
Go
7
star
48

signal

Go package implements Context for os/signal
Go
7
star
49

drone-jira

Drone plugin for sending build and deployment status updates to Jira
Go
7
star
50

autoscaler-docs

Documentation for the Drone Autoscaler
6
star
51

drone-hugo-theme

Hugo theme for Drone documentation
CSS
6
star
52

go-license

Package license provides software license management utilities
Go
6
star
53

boilr-convert

boilr template for creating Drone conversion extensions
Go
5
star
54

ui-template

Harness micro-frontend template
TypeScript
5
star
55

boilr-webhook

boilr template for creating Drone webhook extensions
Go
4
star
56

spec

JavaScript
4
star
57

ui-core

Experimental React component library for Drone.
TypeScript
4
star
58

boilr-runner

boilr template for creating custom pipeline runners
Go
4
star
59

funcmap

Template functions for Go templates
Go
3
star
60

plugin

Tool to execute plugins
Go
3
star
61

drone-gitleaks

Drone Plugin for detecting credentials or other sensitive data in your repository
Go
3
star
62

blog

static website for blog.drone.io
HTML
3
star
63

boilr-admission

boilr template for creating Drone admission extensions
Go
3
star
64

drone-admit-members

Drone extension to restrict access based on organization membership
Go
3
star
65

go-task

Go
3
star
66

ff-test-cases

Test cases for FF SDKs evaluator tests
Go
2
star
67

go-generate

Package generate provides tools for generating pipeline configuration files in the Drone format.
Go
2
star
68

boilr-secret

boilr template for creating Drone secret extensions
Go
2
star
69

boilr-environ

boilr template for creating Drone environment variable extensions
Go
2
star
70

ff-nodejs-server-sample

ff-nodejs-server-sample
JavaScript
2
star
71

ff-ios-client-sample

Swift
2
star
72

drone-yaml-v1

moved to https://github.com/drone/drone-yaml
Go
1
star
73

drone.js

[MOVED] Javascript client for the Drone API
JavaScript
1
star
74

drone-secret-plugin

Secrets extension for backward compatibility with 0.8 global secrets files.
Go
1
star
75

ff-java-server-sample

Sample application using Java Server SDK
Java
1
star
76

ff-dotnetcore-server-sample

C#
1
star
77

ff-javascript-client-sample

JavaScript
1
star
78

hubot-drone

1
star
79

expr

Go package evaluates SQL expressions
Go
1
star
80

ff-dotnet-server-sample

C#
1
star
81

ff-golang-server-sample

Go
1
star
82

ff-flutter-client-sample

Dart
1
star