Skip to content

Instantly share code, notes, and snippets.

@coolov
Created October 13, 2020 19:25
Show Gist options
  • Save coolov/60bc758abceb31a8d8c5df65ee7f2f95 to your computer and use it in GitHub Desktop.
Save coolov/60bc758abceb31a8d8c5df65ee7f2f95 to your computer and use it in GitHub Desktop.
depends_on utility
local util = import 'util.jsonnet';
local test = import 'test.jsonnet';
local build_css = {
image: 'node-image',
name: 'build-css',
depends_on: util.depends_on([test.lint_css, test.lint_script, test.test_js]),
commands: [] // etc
};
build_css
{
lint_css: {
image: 'node-image',
name: 'lint-css',
commands: [] // etc
},
lint_script: {
image: 'node-image',
name: 'lint-css',
commands: [] // etc
},
test_js: {
image: 'node-image',
name: 'test-js',
commands: [] // etc
}
}
{
depends_on(steps):: std.map(function(x) x.name, steps)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment