Mirror TF-M, TF-A, TS projects into GitHub
Description
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:
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
Hafnium
https://git.trustedfirmware.org/hafnium/project/reference.git/
https://git.trustedfirmware.org/hafnium/third_party/dtc.git/
https://git.trustedfirmware.org/hafnium/third_party/googletest.git/
https://git.trustedfirmware.org/hafnium/third_party/linux.git/
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:
Trusted Services(TS)
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
Attachments
Activity
Arthur She October 3, 2023 at 4:14 AMEdited
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
@Olivier Deprez, @Joao Alves, I’ve deleted the ‘master’ branch. thanks
Olivier Deprez September 26, 2023 at 7:48 AM
Hi @Arthur She
On behalf of @Joao Alves 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 AMEdited
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
@Joao Alves, 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
@Soby Mathew 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 @Anton Komlev, The script is set to synchronize the "main" branch with GitHub for all TF-M repositories. Kindly proceed to create the branch.
Thanks
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.