This repository was archived by the owner on Aug 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Adde job.dependency #58
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request