Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// the first version is used to build the binary that gets shipped to Docker Hub.
local go_versions = ['1.12', '1.13'];
local go_versions = ['1.13', '1.14'];

local test_ci_dockerfile = {
name: 'test-ci-dockerfile',
Expand Down Expand Up @@ -69,7 +69,7 @@ local lint = {
name: 'lint',
image: 'golangci/golangci-lint',
pull: 'always',
commands: ['golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd --deadline 5m ./...'],
commands: ['golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd -D testpackage --deadline 5m ./...'],
depends_on: ['mod-download'],
};

Expand Down
24 changes: 12 additions & 12 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
kind: pipeline
name: build_go_1.12
name: build_go_1.13

platform:
os: linux
arch: amd64

workspace:
base: /go
path: gcs-helper-1.12
path: gcs-helper-1.13

steps:
- name: mod-download
image: golang:1.12
image: golang:1.13
commands:
- go mod download
environment:
Expand All @@ -21,7 +21,7 @@ steps:
- clone

- name: test
image: golang:1.12
image: golang:1.13
commands:
- go test -race -vet all -mod readonly ./...
depends_on:
Expand All @@ -31,12 +31,12 @@ steps:
pull: always
image: golangci/golangci-lint
commands:
- golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd --deadline 5m ./...
- golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd -D testpackage --deadline 5m ./...
depends_on:
- mod-download

- name: build
image: golang:1.12
image: golang:1.13
commands:
- go build -o gcs-helper -mod readonly -ldflags "-X main.version=$${DRONE_TAG:-SNAPSHOT-${DRONE_COMMIT}}"
environment:
Expand Down Expand Up @@ -104,19 +104,19 @@ steps:

---
kind: pipeline
name: build_go_1.13
name: build_go_1.14

platform:
os: linux
arch: amd64

workspace:
base: /go
path: gcs-helper-1.13
path: gcs-helper-1.14

steps:
- name: mod-download
image: golang:1.13
image: golang:1.14
commands:
- go mod download
environment:
Expand All @@ -125,7 +125,7 @@ steps:
- clone

- name: test
image: golang:1.13
image: golang:1.14
commands:
- go test -race -vet all -mod readonly ./...
depends_on:
Expand All @@ -135,12 +135,12 @@ steps:
pull: always
image: golangci/golangci-lint
commands:
- golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd --deadline 5m ./...
- golangci-lint run --enable-all -D errcheck -D lll -D dupl -D gochecknoglobals -D funlen -D wsl -D gomnd -D testpackage --deadline 5m ./...
depends_on:
- mod-download

- name: build
image: golang:1.13
image: golang:1.14
commands:
- go build -o gcs-helper -mod readonly -ldflags "-X main.version=$${DRONE_TAG:-SNAPSHOT-${DRONE_COMMIT}}"
environment:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ and ``GCS_CLIENT_TIMEOUT`` controls how long requests from gcs-helper to
Google's API can take. Since gcs-helper automatically retries on failures, the
number of retries is roughly the value of ``GCS_HELPER_PROXY_TIMEOUT`` divided
by the value of ``GCS_CLIENT_TIMEOUT``.

## Build

The .drone.yml is generated from the .drone.jsonnet:

```
drone-1 jsonnet .drone.jsonnet --stream
```
3 changes: 2 additions & 1 deletion vodmodule/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package vodmodule

import (
"context"
"errors"
"path"
"regexp"

Expand Down Expand Up @@ -60,7 +61,7 @@ func (m *Mapper) getSequences(ctx context.Context, prefix string, filter *regexp
})
}
}
if err == iterator.Done {
if errors.Is(err, iterator.Done) {
return seqs, nil
}
}
Expand Down