jenkinsrole is a Go package that wraps the API of the Role Strategy plugin for Jenkins. For additional info regarding the plugin itself, see the plugin page.
In order to use the package, run
go get github.com/calmandniceperson/jenkinsrole
and import the package with import github.com/calmandniceperson/jenkinsrole
.
In order to use this package, you need to provide a user token to the Client struct. This token can be acquired by entering the respective user's settings in the top right of the Jenkins UI, selecting Configure
in the menu on the left side and generating a token in the API Token
section.
c := &Client {
HostName: "http://localhost:8080",
User: "admin",
Token: "token123",
}
This package is shared under the MIT License.