{"id":20111451,"url":"https://github.com/openstack/goal-tools","last_synced_at":"2025-07-28T14:39:14.847Z","repository":{"id":66174725,"uuid":"117906925","full_name":"openstack/goal-tools","owner":"openstack","description":"Tools for managing community goals. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-08-02T00:52:30.000Z","size":317,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-02T01:39:18.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/goal-tools","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-17T23:51:50.000Z","updated_at":"2024-08-02T00:52:34.000Z","dependencies_parsed_at":"2023-02-21T06:01:28.008Z","dependency_job_id":null,"html_url":"https://github.com/openstack/goal-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fgoal-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fgoal-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fgoal-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fgoal-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/goal-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224499851,"owners_count":17321605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:16:08.753Z","updated_at":"2024-11-13T18:16:09.218Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========================\n Community-wide Goal Tools\n===========================\n\nTo use the tools, run ``tox -e venv --notest`` to create a virtualenv\nwith all of the dependencies. The tools will then be installed into\n``.tox/venv/bin`` and can be run directly from there or via ``tox -e\nvenv -- COMMAND_NAME``.\n\nimport-goal\n===========\n\n``import-goal`` can be used to create stories, tasks, and boards in\nstoryboard for tracking work on completing the goals.\n\nwho-helped\n==========\n\n``who-helped`` is a tool for looking at the contributor statistics for\na set of patches.\n\npython3-first\n=============\n\nSetup\n-----\n\nTo set up a workspace to use the python3-first tools::\n\n  $ mkdir python3-first\n  $ cd python3-first\n  $ git clone https://git.openstack.org/openstack-infra/project-config\n  $ git clone https://git.openstack.org/openstack-infra/openstack-zuul-jobs\n  $ git clone https://git.openstack.org/openstack-infra/zuul-jobs\n  $ git clone https://git.openstack.org/openstack/goal-tools\n  $ mkdir Output\n\nPreparing Patches\n-----------------\n\nBefore preparing any patches for a team, make sure that all of the\nchanges to modify the .gitreview file for the stable/rocky branches in\nthe repositories have been merged. Failing to do this will mean some\nrocky branch changes will be proposed against master.\n\nTo prepare the patches for one team, use ``do_team.sh``::\n\n  $ cd goal-tools\n  $ ./tools/python3-first/do_team.sh ../Output Documentation\n\nThe script will create a subdirectory in the output location using the\nteam name, clone all of the repositories owned by the team, then\nprocess each one to create a patch for each branch that needs to have\njob settings imported.\n\nIt will also create a log file in the output directory called\n``do_team.TIMESTAMP.log`` (where \"TIMESTAMP\" is replaced with a real\ntimestamp. The log file should show all of the work done, including\nthe diffs for all of the patches created.\n\n::\n\n  $ ls -1 ../Output/Documentation/\n  do_team.2018-08-04T08:15:29-04:00.log\n  master\n  ocata\n  openstack\n  pike\n  queens\n\nProposing Patches\n-----------------\n\nBEFORE PROPOSING ANY PATCHES FOR A TEAM, talk to the PTL of that team\nvia email or IRC to ensure they are ready to receive them.\n\nReview the log file created by ``do_team.sh`` before proposing the\npatches to ensure that there are no extraneous changes (the YAML\nparser does not produce exactly the same format output as input, and\nwe have seen a couple of cases where it introduces errors by changing\nthe indentation level incorrectly).\n\nThen use ``propose.sh`` to submit the patches::\n\n  $ ./tools/python3-first/propose.sh ../Output Documentation\n\nThe script will provide a list of all of the patches to be proposed\nand a count, then wait for you to press ``\u003cReturn\u003e``. After you do, it\nwill submit all of the patches to gerrit.\n\nThe project-config patch\n------------------------\n\n``do_team.sh`` will trigger the script to create the patch to remove\nthe settings from ``openstack-infra/project-config`` for all of the\nrepos for a team. ``propose.sh`` WILL NOT submit the patch, though,\nbecause we do not want it to accidentally be approved before the jobs\nare added in each repository. YOU SHOULD PROPOSE IT early and mark it\nas a work-in-progress by setting the Workflow flag to -1 so teams can\nuse it while reviewing the other patches.\n\n::\n\n  $ cd ../Output/Documentation/openstack-infra/project-config\n  $ git review\n\nMarking the Team \"In Progress\"\n------------------------------\n\n1. Assign yourself to the task from\n   https://storyboard.openstack.org/#!/story/2002586 for the team you\n   are working on and set the status to \"Review\".\n2. The Infrastructure team needs to know not to approve changes to job\n   configurations for a team while the team's settings are being\n   migrated. To inform them, send email to the\n   ``openstack-infra@lists.openstack.org`` list. The ``migration\n   announce`` command will build a message body containing all of the\n   repository names.::\n\n     $ .tox/venv/bin/python3-first migration announce Oslo\n\n     The Zuul project settings for the Oslo repositories\n     has begun. Please do not approve any changes to\n     openstack-infra/project-config/zuul.d/projects.yaml for\n     the following repositories:\n\n     - openstack-dev/cookiecutter\n     - openstack-dev/oslo-cookiecutter\n     - openstack-dev/pbr\n     - openstack/automaton\n     ...\n\n   See\n   http://lists.openstack.org/pipermail/openstack-infra/2018-August/006039.html\n   for an example.\n\nMarking the Team \"Complete\"\n---------------------------\n\n1. Update the sign-up task from\n   https://storyboard.openstack.org/#!/story/2002586 and set the\n   status to \"Merged\".\n2. Reply to the preivous message on the ``openstack-infra`` mailing\n   list to announce that the migration for the team is completed.\n\nTools\n-----\n\n``python3-first`` is the parent command for a set of tools for\nimplementing the `python3-first goal\n\u003chttps://review.opendev.org/#/c/575933/\u003e`_.\n\nThe ``jobs extract`` sub-command reads the Zuul configuration from the\n``openstack/project-config`` repository and then for a given\nrepository and branch prints the set of job definitions that should be\ncopied into that branch of that project.\n\n.. code-block:: console\n\n   $ git clone https://git.openstack.org/openstack-infra/project-config\n   $ git clone https://git.openstack.org/openstack/goal-tools\n   $ cd goal-tools\n   $ tox -e venv -- python3-first jobs extract --project-config ../project-config \\\n   openstack-dev/devstack stable/queens\n\nThe ``jobs retain`` sub-command reads the same Zuul configuration data\nand prints the settings that need to stay in\n``openstack/project-config``.\n\n.. code-block:: console\n\n   $ tox -e venv -- python3-first jobs retain --project-config ../project-config \\\n   openstack-dev/devstack\n\nThe ``jobs update`` command will modify the zuul settings in a\nrepository to include all of the settings shown by ``jobs extract``.\n\n.. code-block:: console\n\n   $ git clone https://git.openstack.org/openstack/oslo.config\n   $ cd oslo.config\n   $ git checkout -b python3-first\n   $ cd ../goal-tools\n   $ tox -e venv -- python3-first jobs update --project-config ../project-config \\\n   ../oslo.config\n\nThe ``repos clone`` command will use the project governance data to\nfind a list of all of the git repositories managed by a project team\nand then clone local copies of all of them. This makes it easier to\nwork on all of the projects for a single team as a batch.\n\n.. code-block:: console\n\n   $ mkdir Oslo\n   $ cd goal-tools\n   $ tox -e venv -- python3-first repos clone ../Oslo Oslo\n\nUse the ``-v`` option to python3-first to see debug information on\nstderr (allowing stdout to be redirected to a file safely).\n\nThere are several higher-level wrapper scripts for running these tools\nin ``tools/python3-first``.\n\n``do_team.sh`` takes as input a goal URL, a working directory and a\nteam name. It clones all of the repositories owned by the team and\nprepares local branches with patches to import jobs into master and\nall of the relevant stable branches.\n\n.. code-block:: console\n\n   $ cd goal-tools\n   $ ./tools/python3-first/do_team.sh ../Py3FirstGoalWork Documentation\n\n``process_team.sh`` can be used to re-run one stage of the patch\ncreation process for all of the repos and a single branch.\n\n.. code-block:: console\n\n   $ ./tools/python3-first/process_team.sh ../Py3FirstGoalWork Documentation stable/rocky\n\n``do_repo.sh`` creates the branch and patch for a single repository.\n\n.. code-block:: console\n\n   $ ./tools/python3-first/do_repo.sh ../Py3FirstGoalWork/openstack/whereto stable/rocky\n\nAfter all of the patches for a team are prepared locally, they can be\nsubmitted for review using ``propose.sh``.\n\n.. code-block:: console\n\n   $ ./tools/python3-first/propose.sh ../Py3FirstGoalWork Documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fgoal-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fgoal-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fgoal-tools/lists"}