jsonnet-bundler/.drone.jsonnet
Matthias Loibl bcd89fd33d
feat(spec): version field (#85)
Adds a `version` field to the `jsonnetfile.json`, so that `jb` can automatically recognize too old / too new schema versions, instead of panicking.
2020-02-28 17:41:49 +01:00

56 lines
918 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',
],
},
steps: [
golang() {
name: 'gomod',
commands: [
'go mod vendor',
'git diff --exit-code',
],
},
build('1.11'),
build('1.12'),
build('1.13'),
build('1.14-rc'),
golang() {
name: 'generate',
commands: [
'make check-license',
'make generate',
'git diff --exit-code',
],
},
],
}