Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Trigger pipeline and download artifacts from triggered pipeline #1021

Closed
@Letme

Description

@Letme

It should be a simple exercise, but in fact because of all the tokens it is not. There are few issues and I tried few variations, but to no avail. I am trying to trigger pipline and download artifacts of project A to pipeline that is running in project B and then use those artifacts to compile documentation.

Example I assembled based on documentation:

gl = gitlab.Gitlab('https://gitlab.melexis.com', job_token=os.environ['CI_JOB_TOKEN'])project = gl.projects.get(project_id, lazy=True)pipeline = project.trigger_pipeline('branchname', 'targetprojecttoken', variables={"VAR1": "True"})# Start pipeline and wait for completionwhile pipeline.finished_at is None:    pipeline.refresh()    time.sleep(1)

So, first problem was that I want to useCI_JOB_TOKEN to trigger the pipeline (nottargetprojecttoken). This is something that can be done with curl, but here it does not work (tried with replacingtargetprojecttoken withos.environ['CI_JOB_TOKEN'] but I getgitlab.exceptions.GitlabCreateError: 404: 404 Not Found).

Now for second more pressing issue here is thatpipeline.refresh() returnsgitlab.exceptions.GitlabGetError: 404: 404 Project Not Found although I confirmed thattrigger_pipeline did trigger the pipeline.

Expected Behavior

Actual Behavior

  • trigger_pipeline works withtargetprojecttoken instead ofjob_token
  • pipeline.refresh() returnsgitlab.exceptions.GitlabGetError: 404: 404 Project Not Found

Specifications

  • python-gitlab version: 2.0.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): private

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp