@@ -752,4 +752,48 @@ public Pipeline triggerPipeline(Object projectIdOrPath, String token, String ref
752752 "projects" , getProjectIdOrPath (projectIdOrPath ), "trigger" , "pipeline" );
753753 return (response .readEntity (Pipeline .class ));
754754 }
755+
756+ /**
757+ * Get List of variables of a pipeline.
758+ *
759+ * <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
760+ *
761+ * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
762+ * @param pipelineId the pipeline ID
763+ * @return a List of pipeline variables
764+ * @throws GitLabApiException if any exception occurs
765+ */
766+ public List <Variable > getPipelineVariables (Object projectIdOrPath , Integer pipelineId ) throws GitLabApiException {
767+ return (getPipelineVariables (projectIdOrPath , pipelineId , getDefaultPerPage ()).all ());
768+ }
769+
770+ /**
771+ * Get a Pager of variables of a pipeline.
772+ *
773+ * <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
774+ *
775+ * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
776+ * @param pipelineId the pipeline ID
777+ * @param itemsPerPage the number of Pipeline instances that will be fetched per page
778+ * @return a Pager of pipeline variables
779+ * @throws GitLabApiException if any exception occurs
780+ */
781+ public Pager <Variable > getPipelineVariables (Object projectIdOrPath , Integer pipelineId , int itemsPerPage ) throws GitLabApiException {
782+ return (new Pager <Variable >(this , Variable .class , itemsPerPage , null ,
783+ "projects" , getProjectIdOrPath (projectIdOrPath ), "pipelines" , pipelineId , "variables" ));
784+ }
785+
786+ /**
787+ * Get a Stream of variables of a pipeline as a Stream.
788+ *
789+ * <pre><code>GET /projects/:id/pipelines/:pipeline_id/variables</code></pre>
790+ *
791+ * @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
792+ * @param pipelineId the pipeline ID
793+ * @return a Stream of pipeline variables
794+ * @throws GitLabApiException if any exception occurs
795+ */
796+ public Stream <Variable > getPipelineVariablesStream (Object projectIdOrPath , Integer pipelineId ) throws GitLabApiException {
797+ return (getPipelineVariables (projectIdOrPath , pipelineId , getDefaultPerPage ()).stream ());
798+ }
755799}
0 commit comments