Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Adde job.dependency #58

@bitfoo1

Description

@bitfoo1

gcip version you are using?

pip freeze | grep gcip

What should gcip do differently? Which functionality do you think we should add?

Allow a Job depends on another job to download the artifacts from dependent job.
In the reference it is written in the artifacts section, but actually it is a Job function.
Therefore, I think it should be directly in the gcip.core.Job class.

Sample User usage

parent_job = Job(script=["echo 'I am a dependent job'"], name="parent")
parent2_job = Job(script=["echo ' I am the second dependent job.'", name="parent2"]

job = Job(script=["echo 'I depend on parent job'"], name="child")
job.add_dependencies(parent_job, parent2_job)

Sample implementation

def add_dependencies(self, *dependencies: Union[List[Job], Job]):
    self._dependencies = {"dependency": []}
    for dependency in dependencies:
            self._dependecies['dependency'].append(dependency)

GitlabCI Reference: https://docs.gitlab.com/ee/ci/yaml/README.html#dependencies

What are you trying to do? What problem would this solve?

Did gcip help you today? Did it make you happy in any way?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions