8000 source/artifacts script · Issue #206 · dnephin/dobi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

source/artifacts script #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
siredmar opened this issue Nov 6, 2020 · 1 comment
Open

source/artifacts script #206

siredmar opened this issue Nov 6, 2020 · 1 comment

Comments

@siredmar
Copy link
Contributor
siredmar commented Nov 6, 2020

It would be nice if dobi had a way to pass a script that checks own source/artifacts patterns besides the already present local files checks.
For example if i use dobi to deploy some deployment to kubernetes, i'd like to check the dependencies for my deployment, e.g. if something like cert-manager is already present. If the cert-manager is already present, the depends section would be skipped for my deployment.
The resource would be marked fresh when the script returns 0, otherwise the image/job will be build/triggered.

Proposal:
A new property called sources-artifact-job that refers to a dobi job that either fails (returns 1) or succeeds (returns 0).

Example:

meta:
  project: test

image=bash:
    image=bash
    tags: [latest]
    pull: once

image=checkimage:
    image=checkimage
    tags: [latest]
    pull: once

# this job returns either 0 or 1
job=check-dependency-job:
    use: checkimage
    command: /check.sh

job=dependency-job:
    use: bash
    command: /do-something-as-dependency.sh
    sources-artifact-job: check-dependency-job

job=main-job:
    use: bash
    command: /do-something.sh
    depends: [dependency-job]
@dnephin
Copy link
Owner
dnephin commented Nov 7, 2020

I like this idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0