go.mod: update dependencies

Update all the updatable dependencies
This commit is contained in:
Simone Gotti 2019-10-24 10:58:57 +02:00
parent ec67b26d21
commit e18794764e
11 changed files with 613 additions and 292 deletions

View File

@ -32,7 +32,7 @@ local task_build_go(version, arch) = {
{ type: 'run', command: 'make' },
{ type: 'save_cache', key: 'cache-sum-{{ md5sum "go.sum" }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
{ type: 'save_cache', key: 'cache-date-{{ year }}-{{ month }}-{{ day }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
{ type: 'run', name: 'install golangci-lint', command: 'curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0' },
{ type: 'run', name: 'install golangci-lint', command: 'curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0' },
{ type: 'run', command: 'golangci-lint run --deadline 5m' },
{ type: 'run', name: 'build docker/k8s drivers tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/executor/driver -o ./bin/docker-tests' },
{ type: 'run', name: 'build integration tests binary', command: 'go test -tags "sqlite_unlock_notify" -c ./tests -o ./bin/integration-tests' },

98
go.mod
View File

@ -3,75 +3,69 @@ module agola.io/agola
go 1.12
require (
code.gitea.io/gitea v1.9.0-dev.0.20190511102134-34eee25bd42d
code.gitea.io/sdk/gitea v0.0.0-20190602153954-7e711e06b588
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Masterminds/squirrel v0.0.0-20181204161840-e5bf00f96d4a
github.com/Microsoft/go-winio v0.4.11 // indirect
code.gitea.io/gitea v1.9.4
code.gitea.io/sdk/gitea v0.0.0-20191013013401-e41e9ea72caa
github.com/Masterminds/squirrel v1.1.0
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/bmatcuk/doublestar v1.1.1
github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 // indirect
github.com/bmatcuk/doublestar v1.1.5
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 // indirect
github.com/creack/pty v1.1.9 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.3.3 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.0
github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f // indirect
github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-bindata/go-bindata v1.0.0
github.com/go-ini/ini v1.42.0 // indirect
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/google/go-cmp v0.3.0
github.com/google/go-containerregistry v0.0.0-20190412005658-1d38b9cfdb9d
github.com/google/go-github/v25 v25.0.4
github.com/google/go-jsonnet v0.12.1
github.com/google/gofuzz v1.0.0 // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/gorilla/handlers v1.4.0
github.com/gorilla/mux v1.7.0
github.com/hashicorp/go-sockaddr v1.0.1
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/json-iterator/go v1.1.6 // indirect
github.com/go-ini/ini v1.49.0 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/google/go-cmp v0.3.1
github.com/google/go-containerregistry v0.0.0-20191023194145-7683b4ee5f61
github.com/google/go-github/v28 v28.1.1
github.com/google/go-jsonnet v0.14.0
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.3
github.com/gorilla/websocket v1.4.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.11.3 // indirect
github.com/hashicorp/go-sockaddr v1.0.2
github.com/imdario/mergo v0.3.8 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/mattn/go-sqlite3 v1.10.0
github.com/mattn/go-sqlite3 v1.11.0
github.com/minio/minio-go v6.0.14+incompatible
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-homedir v1.1.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
github.com/sanity-io/litter v1.1.0
github.com/prometheus/client_golang v1.2.1 // indirect
github.com/sanity-io/litter v1.2.0
github.com/satori/go.uuid v1.2.0
github.com/sgotti/gexpect v0.0.0-20161123102107-0afc6c19f50a
github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 // indirect
github.com/spf13/cobra v0.0.3
github.com/xanzy/go-gitlab v0.14.1
go.etcd.io/etcd v0.0.0-20181128220305-dedae6eb7c25
go.uber.org/zap v1.9.1
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.42.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.0
gopkg.in/src-d/go-git.v4 v4.10.0
gopkg.in/yaml.v2 v2.2.2
gotest.tools v2.2.0+incompatible // indirect
k8s.io/api v0.0.0-20190313235455-40a48860b5ab
k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1
k8s.io/client-go v11.0.0+incompatible
k8s.io/klog v0.3.0 // indirect
k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7
sigs.k8s.io/yaml v1.1.0 // indirect
github.com/spf13/cobra v0.0.5
github.com/xanzy/go-gitlab v0.21.0
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go.uber.org/multierr v1.2.0 // indirect
go.uber.org/zap v1.11.0
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sys v0.0.0-20191024073052-e66fe6eb8e0c // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect
gopkg.in/ini.v1 v1.49.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.2.4
k8s.io/api v0.0.0-20191016110408-35e52d86657a
k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8
k8s.io/client-go v0.0.0-20191016111102-bec269661e48
k8s.io/utils v0.0.0-20190801114015-581e00157fb1
)
replace github.com/docker/docker v1.13.1 => github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb

765
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,6 @@ import (
gitsource "agola.io/agola/internal/gitsources"
gtypes "code.gitea.io/gitea/modules/structs"
"code.gitea.io/sdk/gitea"
"golang.org/x/oauth2"
errors "golang.org/x/xerrors"
@ -70,16 +69,16 @@ type Client struct {
}
// fromCommitStatus converts a gitsource commit status to a gitea commit status
func fromCommitStatus(status gitsource.CommitStatus) gtypes.StatusState {
func fromCommitStatus(status gitsource.CommitStatus) gitea.StatusState {
switch status {
case gitsource.CommitStatusPending:
return gtypes.StatusPending
return gitea.StatusPending
case gitsource.CommitStatusSuccess:
return gtypes.StatusSuccess
return gitea.StatusSuccess
case gitsource.CommitStatusError:
return gtypes.StatusError
return gitea.StatusError
case gitsource.CommitStatusFailed:
return gtypes.StatusFailure
return gitea.StatusFailure
default:
panic(errors.Errorf("unknown commit status %q", status))
}
@ -197,7 +196,7 @@ func (c *Client) LoginPassword(username, password, tokenName string) (string, er
token, terr := c.client.CreateAccessToken(
username,
password,
gtypes.CreateAccessTokenOption{Name: tokenName},
gitea.CreateAccessTokenOption{Name: tokenName},
)
if terr != nil {
return "", terr
@ -246,7 +245,7 @@ func (c *Client) CreateDeployKey(repopath, title, pubKey string, readonly bool)
if err != nil {
return err
}
if _, err = c.client.CreateDeployKey(owner, reponame, gtypes.CreateKeyOption{
if _, err = c.client.CreateDeployKey(owner, reponame, gitea.CreateKeyOption{
Title: title,
Key: pubKey,
ReadOnly: readonly,
@ -282,7 +281,7 @@ func (c *Client) UpdateDeployKey(repopath, title, pubKey string, readonly bool)
}
}
if _, err := c.client.CreateDeployKey(owner, reponame, gtypes.CreateKeyOption{
if _, err := c.client.CreateDeployKey(owner, reponame, gitea.CreateKeyOption{
Title: title,
Key: pubKey,
ReadOnly: readonly,
@ -320,7 +319,7 @@ func (c *Client) CreateRepoWebhook(repopath, url, secret string) error {
return err
}
opts := gtypes.CreateHookOption{
opts := gitea.CreateHookOption{
Type: "gitea",
Config: map[string]string{
"url": url,
@ -366,7 +365,7 @@ func (c *Client) CreateCommitStatus(repopath, commitSHA string, status gitsource
if err != nil {
return err
}
_, err = c.client.CreateStatus(owner, reponame, commitSHA, gtypes.CreateStatusOption{
_, err = c.client.CreateStatus(owner, reponame, commitSHA, gitea.CreateStatusOption{
State: fromCommitStatus(status),
TargetURL: targetURL,
Description: description,

View File

@ -30,7 +30,7 @@ import (
gitsource "agola.io/agola/internal/gitsources"
"github.com/google/go-github/v25/github"
"github.com/google/go-github/v28/github"
"golang.org/x/oauth2"
errors "golang.org/x/xerrors"
)

View File

@ -23,7 +23,7 @@ import (
"agola.io/agola/internal/services/types"
"github.com/google/go-github/v25/github"
"github.com/google/go-github/v28/github"
errors "golang.org/x/xerrors"
)

View File

@ -137,7 +137,7 @@ func (c *Client) RefreshOauth2Token(refreshToken string) (*oauth2.Token, error)
}
func (c *Client) GetRepoInfo(repopath string) (*gitsource.RepoInfo, error) {
rr, _, err := c.client.Projects.GetProject(repopath)
rr, _, err := c.client.Projects.GetProject(repopath, nil)
if err != nil {
return nil, err
}

View File

@ -331,7 +331,7 @@ func (e *Executor) mkdir(ctx context.Context, t *types.ExecutorTask, pod driver.
}
func (e *Executor) template(ctx context.Context, t *types.ExecutorTask, pod driver.Pod, logf io.Writer, key string) (string, error) {
cmd := append([]string{toolboxContainerPath, "template"})
cmd := []string{toolboxContainerPath, "template"}
// limit the template answer to max 1MiB
stdout := util.NewLimitedBuffer(1024 * 1024)

View File

@ -68,7 +68,7 @@ const (
)
var (
SkipRunMessage = regexp.MustCompile(`.*\[ci skip\].*`)
SkipRunMessage = regexp.MustCompile(`.*\[ci skip\].*`)
)
func (h *ActionHandler) GetRun(ctx context.Context, runID string) (*rsapitypes.RunResponse, error) {

View File

@ -1303,7 +1303,7 @@ func (s *Runservice) runOSTArchiver(ctx context.Context, r *types.Run) error {
return err
}
actions := append([]*datamanager.Action{ra})
actions := []*datamanager.Action{ra}
if _, err = s.dm.WriteWal(ctx, actions, nil); err != nil {
return err

View File

@ -41,7 +41,6 @@ import (
gwclient "agola.io/agola/services/gateway/client"
rstypes "agola.io/agola/services/runservice/types"
gtypes "code.gitea.io/gitea/modules/structs"
"code.gitea.io/sdk/gitea"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
@ -382,7 +381,7 @@ func createLinkedAccount(ctx context.Context, t *testing.T, tgitea *testutil.Tes
giteaAPIURL := fmt.Sprintf("http://%s:%s", tgitea.HTTPListenAddress, tgitea.HTTPPort)
giteaClient := gitea.NewClient(giteaAPIURL, "")
giteaToken, err := giteaClient.CreateAccessToken(giteaUser01, "password", gtypes.CreateAccessTokenOption{Name: "token01"})
giteaToken, err := giteaClient.CreateAccessToken(giteaUser01, "password", gitea.CreateAccessTokenOption{Name: "token01"})
if err != nil {
t.Fatalf("unexpected err: %v", err)
}
@ -449,8 +448,8 @@ func TestCreateProject(t *testing.T) {
createProject(ctx, t, giteaClient, gwClient)
}
func createProject(ctx context.Context, t *testing.T, giteaClient *gitea.Client, gwClient *gwclient.Client) (*gtypes.Repository, *gwapitypes.ProjectResponse) {
giteaRepo, err := giteaClient.CreateRepo(gtypes.CreateRepoOption{
func createProject(ctx context.Context, t *testing.T, giteaClient *gitea.Client, gwClient *gwclient.Client) (*gitea.Repository, *gwapitypes.ProjectResponse) {
giteaRepo, err := giteaClient.CreateRepo(gitea.CreateRepoOption{
Name: "repo01",
})
if err != nil {