Mirror TF-M, TF-A, TS projects into GitHub

Description

Depending on project needs

  • Automatic Repo Mirroring

  • Automatic Pull Request Bot replies

  • Automatic Issue Request Bot replies

Various Jenkins jobs need to be setup and/or shared to provide the automatic action.

As examples from Arm internal Jenkins jobs we have the following that could be repurposed:

Mirroring:

Jenkins Job source: tf-sync-repos.yaml - see attached

which calls the script below.

Script https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/tree/job/tf-sync-repos/sync.sh

 

Bot Auto Reply:

Jenkins Job source: tf-github-autoreply.yaml - see attached.

which calls the script below.

Script https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/tree/job/tf-github-autoreply

Examples of what these result in below.

Auto bot reply example to a Pull Request: https://github.com/ARM-software/arm-trusted-firmware/pull/1983

Auto bot reply example to a raised Issue: https://github.com/ARM-software/tf-issues/issues/710

 

There is a Github Bot user (ssg-bot) that’s been created that’s an Arm account that is used to do the auto responding.

 

All of these will then need to be repurposed for Trusted Firmware Github projects. An equivalent Trusted Firmware bot user will need to be used in the trustedfirmware Github organisation https://github.com/TrustedFirmware-A .

 

As for the original https://github.com/ARM-software/arm-trusted-firmware we the TF-A team need to decide how to manage that. Either have two mirrors or have pointers to the new TF-A from the old ArmSoftware one. If we do keep it do we share Arm ssg-bot credentials with Trusted Firmware to use or do we deploy the mirroring from the Arm internal AWS OpenCI instance. We will discuss further on this to determine out what’s best.

Environment

The discussion on GitHub presence for tf.org projects (TF-A, TF-M, TS) concluded to provide a read-only mirrors of the existing CGit repos. The corresponded accounts were created for this purpose:

  1. https://github.com/TrustedFirmware-A

  2. https://github.com/TF-Hafnium

  3. https://github.com/TrustedFirmware-M

  4. https://github.com/Trusted-Services

This request is to create a 1-way synchronisation mechanism, keeping GitHub repositories up to date, following the existing Gerrit repos.

The repositories for mirroring

each project above has multiple repositories and corresponded copies shall be created on GitHub.

TF-A

  1. https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/

  2. https://git.trustedfirmware.org/TF-A/tf-a-tests.git/

  3. https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/

Hafnium

  1. https://git.trustedfirmware.org/hafnium/hafnium.git/

  2. https://git.trustedfirmware.org/hafnium/driver/linux.git/

  3. https://git.trustedfirmware.org/hafnium/prebuilts.git/

  4. https://git.trustedfirmware.org/hafnium/project/reference.git/

  5. https://git.trustedfirmware.org/hafnium/third_party/dtc.git/

  6. https://git.trustedfirmware.org/hafnium/third_party/googletest.git/

  7. https://git.trustedfirmware.org/hafnium/third_party/linux.git/

  8. https://git.trustedfirmware.org/ci/hafnium-job-configs.git/

  9. https://git.trustedfirmware.org/ci/hafnium-ci-scripts.git/ (optional, currently empty)

TF-M

All 4 repositories under https://git.trustedfirmware.org/TF-M/ , namely:

  1. https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/

  2. https://git.trustedfirmware.org/TF-M/tf-m-tests.git/

  3. https://git.trustedfirmware.org/TF-M/tf-m-tools.git/

  4. https://git.trustedfirmware.org/TF-M/tf-m-extras.git/

Trusted Services(TS)

  1. https://git.trustedfirmware.org/TS/trusted-services.git/ ?

Note

TF-A project already has the mirror in ARM-software account: https://github.com/ARM-software/arm-trusted-firmware and can be used as a reference, if helps.

 

Engineering Progress Update

None

Attachments

5

Activity

Show:

Arthur She October 3, 2023 at 4:14 AM
Edited

Since the GitHub mirroring job has been working, I would submit the auto-response job first and then find some time to migrate it to GitHub action later. I’ve created a ticket for that.

Arthur She September 26, 2023 at 1:38 PM

, , I’ve deleted the ‘master’ branch. thanks

Olivier Deprez September 26, 2023 at 7:48 AM

Hi

On behalf of yes master branches can be removed from github. This is remnant from when I had done the initial import months ago.

Arthur She September 26, 2023 at 3:14 AM
Edited

  • tf-sync-github-repos

    • patch merged

    • Manual sync and updated the GitHub projects setting

    • The job is online and starts to mirror the repo once the project gets an update

    • , I’ve synced Gerrit.master → GitHub.main for the Hafnium projects and set the ‘main’ as the default branch, however, the ‘master’ branch on the following repos still remains. Do you want to keep it, or delete it?

  • tf-github-auto-response

    • Update TF-M comment templates

    • mentioned the PR auto-response could be done by GitHub action and no need OpenCI to be involved.

    • if the issue auto-response could be done as well, we could use that approach

    • doing some research about it

Arthur She September 11, 2023 at 2:18 PM

Hi , The script is set to synchronize the "main" branch with GitHub for all TF-M repositories. Kindly proceed to create the branch.

Thanks

Done

Details

Assignee

Reporter

Upstream

No

Components

Priority

Checklist

Sentry

Created March 31, 2022 at 10:38 AM
Updated January 3, 2024 at 5:26 PM
Resolved October 3, 2023 at 4:16 AM

Flag notifications