Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3469

Investigate: Mirror Loraine Lab repositories on GitHub

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      We can reach a wider audience of developers and scientists if we mirror all our repositories on github.

      For this task:

      • Investigate ways to automate mirroring and updating lorainelab bitbucket repositories on github
      • Investigate if there are ansible playbooks / modules written that could help with this

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Update:

            Customization:

            • I don't want the pipeline to run every time I push to the repository; considering renaming pipeline "default" to something else
            • To make the pipeline not the default, add it under category "custom" with pipeline name "mirror_to_github" (integrated genome browser pipeline has an example)
            Show
            ann.loraine Ann Loraine added a comment - - edited Update: Made a new lorainelab workspace public repository https://bitbucket.org/lorainelab/bitbucket-to-github-sync added all the repository variables except the bitbucket app password (BITBUCKET_APP_PASSWORD) and the github token (GITHUB_TOKEN) because I have not made those yet Customization: I don't want the pipeline to run every time I push to the repository; considering renaming pipeline "default" to something else To make the pipeline not the default, add it under category "custom" with pipeline name "mirror_to_github" (integrated genome browser pipeline has an example)
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Update:

            • My first commit of an initial default "starter" bitbucket pipeline YML configuration file printed some useful stuff, including a list of default repository variables, including:

            Default variables:
            BITBUCKET_BRANCH
            BITBUCKET_BUILD_NUMBER
            BITBUCKET_CLONE_DIR
            BITBUCKET_COMMIT
            BITBUCKET_GIT_HTTP_ORIGIN
            BITBUCKET_GIT_SSH_ORIGIN
            BITBUCKET_PARALLEL_STEP
            BITBUCKET_PARALLEL_STEP_COUNT
            BITBUCKET_PIPELINE_UUID
            BITBUCKET_PROJECT_KEY
            BITBUCKET_PROJECT_UUID
            BITBUCKET_REPO_FULL_NAME
            BITBUCKET_REPO_IS_PRIVATE
            BITBUCKET_REPO_OWNER
            BITBUCKET_REPO_OWNER_UUID
            BITBUCKET_REPO_SLUG
            BITBUCKET_REPO_UUID
            BITBUCKET_SSH_KEY_FILE
            BITBUCKET_STEP_RUN_NUMBER
            BITBUCKET_STEP_TRIGGERER_UUID
            BITBUCKET_STEP_UUID
            BITBUCKET_WORKSPACE

            • I guess I did not need to manually add BITBUCKET_WORKSPACE variable, since this repository is in the same workspace as the repositories I want to mirrow.
            Show
            ann.loraine Ann Loraine added a comment - - edited Update: My first commit of an initial default "starter" bitbucket pipeline YML configuration file printed some useful stuff, including a list of default repository variables, including: Default variables: BITBUCKET_BRANCH BITBUCKET_BUILD_NUMBER BITBUCKET_CLONE_DIR BITBUCKET_COMMIT BITBUCKET_GIT_HTTP_ORIGIN BITBUCKET_GIT_SSH_ORIGIN BITBUCKET_PARALLEL_STEP BITBUCKET_PARALLEL_STEP_COUNT BITBUCKET_PIPELINE_UUID BITBUCKET_PROJECT_KEY BITBUCKET_PROJECT_UUID BITBUCKET_REPO_FULL_NAME BITBUCKET_REPO_IS_PRIVATE BITBUCKET_REPO_OWNER BITBUCKET_REPO_OWNER_UUID BITBUCKET_REPO_SLUG BITBUCKET_REPO_UUID BITBUCKET_SSH_KEY_FILE BITBUCKET_STEP_RUN_NUMBER BITBUCKET_STEP_TRIGGERER_UUID BITBUCKET_STEP_UUID BITBUCKET_WORKSPACE I guess I did not need to manually add BITBUCKET_WORKSPACE variable, since this repository is in the same workspace as the repositories I want to mirrow.
            Hide
            pbhatia1 Pranav Bhatia (Inactive) added a comment -

            Ann Loraine Yes, we need the classic personal access token.

            You can follow the steps below -

            Go to GitHub - Settings - Developer Settings - Personal Access Tokens.
            Click Generate new token (classic).
            Select repo scope (for creating repositories).

            Show
            pbhatia1 Pranav Bhatia (Inactive) added a comment - Ann Loraine Yes, we need the classic personal access token. You can follow the steps below - Go to GitHub - Settings - Developer Settings - Personal Access Tokens. Click Generate new token (classic). Select repo scope (for creating repositories).
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Thanks Pranav Bhatia!

            Update:

            • I think I might change an aspect of how the cloning is happening. Instead of re-aliasing "origin" with the github repository, I might add the github repository as a new remote, calling it "downstream" or something like that.
            • I also am considering dividing the workflow into two different pipelines or steps: one for repository creation and another one for repository updating...not sure about that yet, however.
            Show
            ann.loraine Ann Loraine added a comment - - edited Thanks Pranav Bhatia ! Update: I think I might change an aspect of how the cloning is happening. Instead of re-aliasing "origin" with the github repository, I might add the github repository as a new remote, calling it "downstream" or something like that. I also am considering dividing the workflow into two different pipelines or steps: one for repository creation and another one for repository updating...not sure about that yet, however.
            Hide
            ann.loraine Ann Loraine added a comment -

            Also, I think I should create a new ticket to cover the work I am doing now to deploy the new functionality to our lorainelab workspace.

            Thank you Pranav Bhatia for your work! I am looking forward to getting this up and running on the entire lorainelab workspace!

            Show
            ann.loraine Ann Loraine added a comment - Also, I think I should create a new ticket to cover the work I am doing now to deploy the new functionality to our lorainelab workspace. Thank you Pranav Bhatia for your work! I am looking forward to getting this up and running on the entire lorainelab workspace!

              People

              • Assignee:
                pbhatia1 Pranav Bhatia (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: