Skip to content

Commit b3b06bd

Browse files
itscarom1guelpf
authored andcommitted
add API to get a single artifact
1 parent dd159b0 commit b3b06bd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/Gitlab/Api/Jobs.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ public function artifactsByRefName($project_id, $ref_name, $job_name)
8585
))->getBody();
8686
}
8787

88+
/**
89+
* @param int|string $project_id
90+
* @param string $ref_name
91+
* @param string $job_name
92+
* @param string $artifact_path
93+
* @return StreamInterface
94+
*/
95+
public function artifactByRefName($project_id, $ref_name, $job_name, $artifact_path)
96+
{
97+
return $this->getAsResponse("projects/".$this->encodePath($project_id)."/jobs/artifacts/".$this->encodePath($ref_name)."/raw/".$this->encodePath($artifact_path), array(
98+
'job' => $this->encodePath($job_name)
99+
))->getBody();
100+
}
101+
88102
/**
89103
* @param int|string $project_id
90104
* @param int $job_id

0 commit comments

Comments
 (0)