jsonnet-bundler/.drone.jsonnet
sh0rez 376432fadd
feat(cli): version flag (#60)
* feat(cli): version flag

Adds a --version flag to jb. Only available on go versions greater than 1.12

* style: add license headers

* chore(ci): generate only on latest go

* fix: unique step names

* doc: include version in README help text

* fix: rebuild .drone.yml using drone.cli

* fix: remove race condidion from CI
2019-12-14 16:40:30 +01:00

57 lines
1,000 B
Jsonnet

{
kind: 'pipeline',
name: 'default',
platform: {
os: 'linux',
arch: 'amd64',
},
local golang(version='latest') = {
name: 'golang',
image: 'golang:%s' % version,
pull: 'always',
environment: {
CGO_ENABLED: '0',
GO111MODULE: 'on',
},
when: {
event: {
exclude: ['tag'],
},
},
},
local build(version) = golang(version) {
name: 'build-%s' % version,
commands: [
'make build',
'make test',
'make test-integration',
],
depends_on: ["gomod"]
},
steps: [
golang() {
name: 'gomod',
commands: [
'go mod vendor',
'git diff --exit-code',
],
},
build('1.11'),
build('1.12'),
build('1.13') + {depends_on: ["build-1.11", "build-1.12"]},
golang() {
name: 'generate',
commands: [
'make check-license',
'make generate',
'git diff --exit-code',
],
depends_on: ["build-1.13"]
},
],
}