Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packit configuration maintenance #3024

Merged
merged 3 commits into from
Aug 7, 2024
Merged

Conversation

LecrisUT
Copy link
Contributor

@LecrisUT LecrisUT commented Jun 18, 2024

Pull Request Checklist

  • implement the feature

No effective changes yet, other than the duplication of a pr copr_build to see if it unblocks the non-use_internal_tf jobs

You can see the full configurations with packit validate-config. Comparing them is a nightmare, but you can use jsondiff.com or locally vimdiff to compare these, just get rid of the 2nd job in the "New configuration" in order to diff it more reliably

Original configuration
{
    "packages": {
        "tmt": {
            "downstream_package_name": "tmt",
            "paths": [
                "./"
            ],
            "specfile_path": "tmt.spec",
            "files_to_sync": [
                "tmt.spec",
                ".packit.yaml"
            ],
            "sync_changelog": true,
            "upstream_package_name": "tmt",
            "upstream_project_url": "https:/teemtee/tmt",
            "issue_repository": "https:/teemtee/tmt",
            "srpm_build_deps": [
                "hatch",
                "python3-hatch-vcs"
            ],
            "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml"
        }
    },
    "jobs": [
        {
            "job": "copr_build",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "enable_net": false,
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev.*/.dev888/'\""
                        ]
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "core",
                    "targets": [
                        "fedora-latest-stable",
                        "epel-9"
                    ],
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/features/(core|basic)"
                            }
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "full",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    },
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "^(?!/plans/features/extended-unit-tests).*$"
                            }
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "extended-unit-tests",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    },
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/features/extended-unit-tests$"
                            }
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "provision",
                    "use_internal_tf": true,
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/provision/virtual"
                            }
                        },
                        "environments": [
                            {
                                "tmt": {
                                    "context": {
                                        "how": "provision"
                                    }
                                }
                            }
                        ]
                    },
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "internal-plugins",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "use_internal_tf": true,
                    "fmf_url": "https://gitlab.cee.redhat.com/baseos-qe/tmt.git",
                    "tf_extra_params": {
                        "environments": [
                            {
                                "settings": {
                                    "provisioning": {
                                        "tags": {
                                            "BusinessUnit": "tmt"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "identifier": "internal-wow",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "use_internal_tf": true,
                    "fmf_url": "https://gitlab.cee.redhat.com/baseos-qe/integration_scripts.git",
                    "tmt_plan": "/tmt/integration/plan",
                    "tf_extra_params": {
                        "environments": [
                            {
                                "settings": {
                                    "provisioning": {
                                        "tags": {
                                            "BusinessUnit": "tmt"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "copr_build",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "branch": "main",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "enable_net": false,
                    "list_on_homepage": true,
                    "preserve_project": true,
                    "owner": "@teemtee",
                    "project": "tmt",
                    "release_suffix": "{PACKIT_PROJECT_BRANCH}",
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev/.dev/'\""
                        ]
                    }
                }
            }
        },
        {
            "job": "copr_build",
            "trigger": "release",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "enable_net": false,
                    "list_on_homepage": true,
                    "preserve_project": true,
                    "owner": "@teemtee",
                    "project": "tmt",
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    }
                }
            }
        },
        {
            "job": "propose_downstream",
            "trigger": "release",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "dist_git_branches": [
                        "fedora-all",
                        "epel-9"
                    ]
                }
            }
        },
        {
            "job": "koji_build",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "allowed_pr_authors": [
                        "packit",
                        "psss",
                        "lzachar"
                    ],
                    "allowed_committers": [
                        "packit",
                        "psss",
                        "lzachar"
                    ],
                    "dist_git_branches": [
                        "fedora-all",
                        "epel-9"
                    ]
                }
            }
        },
        {
            "job": "bodhi_update",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "dist_git_branches": [
                        "fedora-branched",
                        "epel-9"
                    ]
                }
            }
        }
    ]
}
New configuration
{
    "packages": {
        "tmt": {
            "downstream_package_name": "tmt",
            "paths": [
                "./"
            ],
            "specfile_path": "tmt.spec",
            "files_to_sync": [
                "tmt.spec",
                ".packit.yaml"
            ],
            "sync_changelog": true,
            "upstream_package_name": "tmt",
            "upstream_project_url": "https:/teemtee/tmt",
            "issue_repository": "https:/teemtee/tmt",
            "srpm_build_deps": [
                "hatch",
                "python3-hatch-vcs"
            ],
            "actions": {
                "create-archive": [
                    "hatch run docs:man",
                    "hatch build -t sdist",
                    "bash -c \"ls dist/tmt-*.tar.gz\""
                ],
                "get-current-version": [
                    "hatch version"
                ]
            },
            "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml"
        }
    },
    "jobs": [
        {
            "job": "copr_build",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev.*/.dev888/'\""
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ]
                }
            }
        },
        {
            "job": "copr_build",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev.*/.dev888/'\""
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable"
                    ]
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable",
                        "epel-9"
                    ],
                    "identifier": "core",
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/features/(core|basic)"
                            }
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "identifier": "full",
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "^(?!/plans/features/extended-unit-tests).*$"
                            }
                        }
                    },
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "identifier": "extended-unit-tests",
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/features/extended-unit-tests$"
                            }
                        }
                    },
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "identifier": "provision",
                    "tf_extra_params": {
                        "test": {
                            "tmt": {
                                "name": "/plans/provision/virtual"
                            }
                        },
                        "environments": [
                            {
                                "tmt": {
                                    "context": {
                                        "how": "provision"
                                    }
                                }
                            }
                        ]
                    },
                    "use_internal_tf": true,
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    }
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "identifier": "internal-plugins",
                    "tf_extra_params": {
                        "environments": [
                            {
                                "settings": {
                                    "provisioning": {
                                        "tags": {
                                            "BusinessUnit": "tmt"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    "use_internal_tf": true,
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    },
                    "fmf_url": "https://gitlab.cee.redhat.com/baseos-qe/tmt.git"
                }
            }
        },
        {
            "job": "tests",
            "trigger": "pull_request",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-latest-stable"
                    ],
                    "identifier": "internal-wow",
                    "tf_extra_params": {
                        "environments": [
                            {
                                "settings": {
                                    "provisioning": {
                                        "tags": {
                                            "BusinessUnit": "tmt"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    "use_internal_tf": true,
                    "require": {
                        "label": {
                            "present": [
                                "full test"
                            ],
                            "absent": [
                                "discuss"
                            ]
                        }
                    },
                    "fmf_url": "https://gitlab.cee.redhat.com/baseos-qe/integration_scripts.git",
                    "tmt_plan": "/tmt/integration/plan"
                }
            }
        },
        {
            "job": "copr_build",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev/.dev/'\""
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "branch": "main",
                    "list_on_homepage": true,
                    "preserve_project": true,
                    "owner": "@teemtee",
                    "project": "tmt",
                    "release_suffix": "{PACKIT_PROJECT_BRANCH}"
                }
            }
        },
        {
            "job": "copr_build",
            "trigger": "release",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "targets": [
                        "fedora-all",
                        "epel-9"
                    ],
                    "list_on_homepage": true,
                    "preserve_project": true,
                    "owner": "@teemtee",
                    "project": "tmt"
                }
            }
        },
        {
            "job": "propose_downstream",
            "trigger": "release",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "dist_git_branches": [
                        "fedora-all",
                        "epel-9"
                    ]
                }
            }
        },
        {
            "job": "koji_build",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "allowed_pr_authors": [
                        "packit",
                        "psss",
                        "lzachar"
                    ],
                    "allowed_committers": [
                        "packit",
                        "psss",
                        "lzachar"
                    ],
                    "dist_git_branches": [
                        "fedora-all",
                        "epel-9"
                    ]
                }
            }
        },
        {
            "job": "bodhi_update",
            "trigger": "commit",
            "packages": {
                "tmt": {
                    "downstream_package_name": "tmt",
                    "paths": [
                        "./"
                    ],
                    "specfile_path": "tmt.spec",
                    "files_to_sync": [
                        "tmt.spec",
                        ".packit.yaml"
                    ],
                    "sync_changelog": true,
                    "upstream_package_name": "tmt",
                    "upstream_project_url": "https:/teemtee/tmt",
                    "issue_repository": "https:/teemtee/tmt",
                    "srpm_build_deps": [
                        "hatch",
                        "python3-hatch-vcs"
                    ],
                    "actions": {
                        "create-archive": [
                            "hatch run docs:man",
                            "hatch build -t sdist",
                            "bash -c \"ls dist/tmt-*.tar.gz\""
                        ],
                        "get-current-version": [
                            "hatch version"
                        ]
                    },
                    "config_file_path": "/home/lecris/PycharmProjects/tmt/.packit.yaml",
                    "dist_git_branches": [
                        "fedora-branched",
                        "epel-9"
                    ]
                }
            }
        }
    ]
}

@LecrisUT LecrisUT force-pushed the chore/update-packit branch 2 times, most recently from 0246f4f to 3b67664 Compare June 18, 2024 15:22
@LecrisUT
Copy link
Contributor Author

I have tried 2 approaches to add a separate copr_build with targets: fedora-latest-stable in hopes that doing so can allow running the build-test jobs on the non-use_internal_tf. This did not work. Nikola suggested that using monorepo like containers/* approaches (i.e. multiple packages for the same spec file/project) would be able to detangle it, but I don't think it's worth it at this point. Dropping that for now and focusing on yaml anchors and the copr @teemtee project.

.packit.yaml Show resolved Hide resolved
@LecrisUT LecrisUT marked this pull request as ready for review June 18, 2024 15:51
@thrix thrix added this to the 1.35 milestone Jun 18, 2024
.packit.yaml Outdated Show resolved Hide resolved
.packit.yaml Show resolved Hide resolved
.packit.yaml Show resolved Hide resolved
@thrix thrix self-requested a review July 31, 2024 11:44
@thrix
Copy link
Collaborator

thrix commented Jul 31, 2024

/packit build

Copy link
Collaborator

@martinhoyer martinhoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for de-duplicating the actions items. It's worth mentioning, that the top-level actions will be inherited by all the jobs, though overriding means overriding the whole actions section.

So if I understand it correctly, the yaml anchors are being used to deduplicate the steps when overriding, like:

actions:
      <<: *base-actions
      get-current-version:
          - foo

If that's the case, isn't it redundant for example at https:/teemtee/tmt/blob/3b6766482edf6d48cdc4da0e1f72e95796f8152a/.packit.yaml#L141C5-L141C27, where we're not overriding it?

@LecrisUT
Copy link
Contributor Author

If that's the case, isn't it redundant for example at https:/teemtee/tmt/blob/3b6766482edf6d48cdc4da0e1f72e95796f8152a/.packit.yaml#L141C5-L141C27, where we're not overriding it?

Indeed, you're right. Similar with targets, I've removed the redundancy there also. Depending on #3024 (comment), we could simplify it even more to have only the create-archive. With #3088 the man page generation could also be simplified. Unfortunately we can't go further than that due to epel9+hatch_vcs (although I did not try to export SETUPTOOLS_SCM_PRETEND_VERSION if that would also solve the issue).

For now, let's check that the configuration is correct. At first glance without the full test label, looks ok.

@martinhoyer martinhoyer added the ci | full test Pull request is ready for the full test execution label Jul 31, 2024
@martinhoyer
Copy link
Collaborator

/packit build

Copy link
Collaborator

@martinhoyer martinhoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean-up, thanks!

Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the deduplication. Looks good, I just noticed we're missing the BusinessUnit part for one of the internal jobs. Also in c523068 I'm proposing to keep a at least a short comment for each job.

.packit.yaml Show resolved Hide resolved
LecrisUT and others added 2 commits August 7, 2024 10:07
- Use yaml anchors
- Remove explicit `enable_net: false` (not needed since June 2022)

Signed-off-by: Cristian Le <[email protected]>
The copr release job needs to explicitly override `base-actions`
otherwise it would inherit them from the `copr_build` definition.
@psss
Copy link
Collaborator

psss commented Aug 7, 2024

If that's the case, isn't it redundant for example at https:/teemtee/tmt/blob/3b6766482edf6d48cdc4da0e1f72e95796f8152a/.packit.yaml#L141C5-L141C27, where we're not overriding it?

I believe that the release copr build actually needs to explicitly define actions, otherwise they would be inherited from the copr_build definition which contains the dev888 hack. Trying to fix that in d710a8e.

Without the change the resulting data are:

      "actions": {
        "get-current-version": [
          "bash -c \"hatch version | sed -E 's/\\\\.[0-9]+\\\\.dev.*/.dev888/'\""
        ],

With it looks as expected:

      "actions": {
        "get-current-version": [
          "hatch version"
        ],

@LecrisUT, @martinhoyer, does it look ok to you?

@psss
Copy link
Collaborator

psss commented Aug 7, 2024

/packit test

@LecrisUT
Copy link
Contributor Author

LecrisUT commented Aug 7, 2024

I believe that the release copr build actually needs to explicitly define actions, otherwise they would be inherited from the copr_build definition which contains the dev888 hack. Trying to fix that in d710a8e.

Aaah yes, forgot I redefined it in the parent *copr_build. Eventually we'll have packit/packit#2378 which would simplify this definition

@psss
Copy link
Collaborator

psss commented Aug 7, 2024

/packit build

@psss
Copy link
Collaborator

psss commented Aug 7, 2024

Eventually we'll have packit/packit#2378 which would simplify this definition

Nice idea!

Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest changes should be ok.

@martinhoyer martinhoyer added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Aug 7, 2024
@psss psss merged commit 33ac4a9 into teemtee:main Aug 7, 2024
20 checks passed
@psss psss self-assigned this Aug 7, 2024
@LecrisUT LecrisUT deleted the chore/update-packit branch August 20, 2024 15:09
The-Mule pushed a commit to The-Mule/tmt that referenced this pull request Oct 14, 2024
- Use yaml anchors
- Remove explicit `enable_net: false` (not needed since June 2022)
- Add missing `BusinessUnit` to the virtual provision job

Signed-off-by: Cristian Le <[email protected]>
Co-authored-by: Petr Šplíchal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants