Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 6.22 KB

MigrateFromAzureDevOpsWithHistory.md

File metadata and controls

79 lines (53 loc) · 6.22 KB

#B Migrate a repository from Azure DevOps to AL-Go for GitHub with history

This walkthrough explains how to migrate a repository from Azure DevOps to AL-Go for GitHub while preserving the full commit history. As a sample, I will use a repository, which was setup using the CI/CD Hands On Lab, including scripts and pipelines from this.

If you do not want to preserve the full commit history, you should use Scenario A or Scenario 11

Note

This walkthrough will leave your existing Azure DevOps repository untouched and you can decide to keep working in that if you like.

  1. Start out by navigating to your Azure DevOps repository. Click the Clone button and click Generate Git Credentials. Azure DevOps

  2. Copy the Password to the clipboard, navigate to GitHub, login and click the small + menu in the top right corner and select Import repository. files

  3. Enter the GIT URL to the Azure DevOps repository, choose the owner+name of the new GitHub repository and specify privacy level. Click Begin Import. createrepo

  4. If your GIT repository requires authentication, you will be asked to provide this (the password you copied to the clipboard). auth

  5. After GitHub is done importing your repo, you can navigate to the repo. importdone

  6. In the new GitHub repository, you might see different messages about branches and PRs. This is because GitHub has imported everything. Ignore this for now. Click the <> Code button and copy the git address to the clipboard. newrepo

  7. Open VS Code, press Ctrl+Shift+P, select Git Clone and paste your git URL into the address bar. Select a location, clone and open the repo and open the Repo in VS Code. clone

  8. Delete the files and folders that are not needed in AL-Go for GitHub (including .github, .azureDevOps, .pipelines and scripts folders), leaving only your apps, your test apps and other files you want to preserve. delete

  9. Now, download the AL-Go template needed, either the PTE template or the AppSource Template. Unpack the .zip file and open the unpacked template files. templatefiles

  10. Drag the needed files and folders from the unpacked files file into VS Code (at a minimum the .AL-Go folder and the .github folder) and select to Copy the folders. newfiles

  11. Modify any settings necessary for the app. Typical settings you might need to modify are:

    Also, if you are migrating an AppSource App, you will need to create a secret called LicenseFileUrl, which should contain a secure direct download URL to your license file, as mentioned here.

    Finally, if you want AL-Go for GitHub to digitally sign your file, you need to create two secrets in the repository (or in the organization) called CodeSignCertificateUrl and CodeSignCertificatePassword, being a secure direct download URL to your PFX certificate and the PFX password for the certificate.

    See a list of all settings here.

  12. In VS Code, in the Source Control area, Add all changed files, Commit the changes and press Sync Changes to push to GitHub. commit

  13. Navigate back to your repository on GitHub. See that your files have been uploaded. Click Settings -> Actions -> General, select Allow all actions and reusable workflows and click Save. upload

  14. Click Actions, select the CI/CD workflow and click Run workflow to manually run the CI/CD workflow. cicd

  15. Open the running workflow to see status and summary and wait for the build to complete. success

  16. Scroll down to see the artifacts and the test results testresults

  17. Navigate to Code and click Commits to see the history and all your commits. history


back