Skip to content
Snippets Groups Projects

CI: handle_artifacts,image_diff: various fixes for pipeline in charge of preserving build artifacts

Merged Dmitry Petrov requested to merge ci-fixes into master

This MR addresses the first problem articulated in following JIRA post: https://secogroup.atlassian.net/browse/YT-54?focusedCommentId=45947 and problems from https://secogroup.atlassian.net/browse/YT-55?focusedCommentId=45999

In particular, the MR contains following fixes:

  • got rid of duplicated code and moved particular classes to dedicated header files;
  • fixed a failure when a previously launched pipeline is canceled. Just added a 10 sec delay before proceeding further, if pipeline was canceled;
  • added a try-except block to ignore exceptions produced by job.keep_artifacts()/job.delete_artifacts() when artifacts for old pipelines are automatically removed;
  • got rid of hard coded values. Reworked the script to parse machine, pipeline names and distro from .gitlab-ci.yml;
  • fixed timeout checking.
Edited by Dmitry Petrov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
113 113 # job.keep_artifacts()
114 114 job = manifest_project.jobs.get(pipelinejob.id, lazy=True)
115 115
116 try:
116 117 if commit.id in keep_artifacts_sha:
117 118 print(f"keep_artifacts() for {pipelinejob.web_url}")
118 119 job.keep_artifacts()
119 120 else:
120 121 print(f"delete_artifacts() for {pipelinejob.web_url}")
121 122 job.delete_artifacts()
122
123 except GitlabCreateError as e:
124 print(f"Error: {e.error_message}")
  • Jonas Höppner changed title from CI: various fixes for pipeline in charge of preserving build artifacts to CI: handle_artifacts,image_diff: various fixes for pipeline in charge of preserving build artifacts

    changed title from CI: various fixes for pipeline in charge of preserving build artifacts to CI: handle_artifacts,image_diff: various fixes for pipeline in charge of preserving build artifacts

  • Dmitry Petrov added 11 commits

    added 11 commits

    • 006a2b52...bf6de920 - 5 commits from branch master
    • 1a4a5ab1 - Refactoring: move common code to separate files
    • b0be529b - handle_artifacts: fix case when pipeline was canceled
    • 3077d252 - handle_artifacts: add "try" block for keep_/delete_artifacts
    • 05d6a8db - fullbuildpipeline.py: fix timeout
    • 4fd7f8a8 - report_image_diff: get rid of hardcode
    • 54f17a69 - Update CI_IMAGES_REVISION

    Compare with previous version

  • Dmitry Petrov changed the description

    changed the description

  • Jonas Höppner enabled an automatic merge when the pipeline for 54f17a69 succeeds

    enabled an automatic merge when the pipeline for 54f17a69 succeeds

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading