vikunja-api/vendor/src.techknowlogick.com/xgo/.drone.jsonnet
renovate 7abac07837 Update src.techknowlogick.com/xgo commit hash to bb0faa3 (#279)
Update src.techknowlogick.com/xgo commit hash to bb0faa3

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/279
2020-04-09 04:36:03 +00:00

50 lines
1.5 KiB
Text

local BuildSwitchDryRun(version='go-latest', tags='latest', dry=false, depends='') = {
name: if dry then 'dry-run-' + version else 'build-' + version,
pull: 'always',
image: 'plugins/docker',
settings: {
dockerfile: 'docker/' + version + '/Dockerfile',
context: 'docker/' + version,
password: {
from_secret: 'docker_password'
},
username: {
from_secret: 'docker_username'
},
repo: 'techknowlogick/xgo',
tags: tags,
dry_run: dry
},
[if depends != '' then 'depends_on']: [
depends
],
[if !dry then 'when']: {
branch: ['master'],
event: {exclude: ['pull_request']}
},
[if dry then 'when']: {
event: ['pull_request']
},
};
local BuildWithDiffTags(version='go-latest', tags='latest', depends='') = BuildSwitchDryRun(version, tags, false, depends);
local BuildWithDiffTagsDry(version='go-latest', tags='latest', depends='') = BuildSwitchDryRun(version, tags, true, depends);
local BuildStep(version='go-latest', depends='') = BuildWithDiffTags(version, version, depends);
local BuildStepDry(version='go-latest', depends='') = BuildSwitchDryRun(version, version, true, depends);
{
kind: 'pipeline',
name: 'default',
steps: [
BuildStepDry('base'),
BuildStepDry('go-1.14.2', 'dry-run-base'),
BuildStepDry('go-1.13.10', 'dry-run-base'),
BuildStep('base'),
BuildStep('go-1.14.2', 'build-base'),
BuildStep('go-1.14.x', 'build-go-1.14.2'),
BuildStep('go-1.13.10', 'build-base'),
BuildStep('go-1.13.x', 'build-go-1.13.10'),
BuildWithDiffTags('go-latest', 'latest', 'build-go-1.14.x'),
]
}