Valet labs for GitLab
This lab bootstraps a Valet environment using GitHub Codespaces and enables you to run the Valet CI/CD migration tool against a isolated GitLab instance running in Docker.
- Use this Repo as a template
- Prerequisites
- Codespace secrets
- Action secrets
- Azure DevOps project creation
- Use Valet with a codespace
- Labs for Azure DevOps
Repo template
- Verify you are in your own Repository created from the landing page Valet Labs.
Prerequisites
- Create a GitHub personal access token.
- To do so, navigate to your GitHub
Settings- click your profile photo and then clickSettings. - Go to
Developer Settings - Go to
Personal Access Tokens->Legacy tokens (if present) - Click
Generate new token->Legacy tokens (if present). If required, provide your password. - Select at least these scopes:
read packagesandworkflow. Optionally, provide a text in the Note field and change the expiration. - Click
Generate token - Copy the PAT somewhere safe and temporary.
- To do so, navigate to your GitHub
Codespace secrets
Please add the following Codespace secrets.
VALET_GHCR_PASSWORD: AddVALET_GHCR_PASSWORDas theNameand the GitHub personal access token created above as the value.
Steps to create the Codespace secrets. Complete for secret noted above:
- Navigate to the
Settingstab in this repo - Find
Secretsand click the down arrow - Click
Codespaces - Click
New Repository Secretto create a new secret - Name the secret as noted above
- Paste in the value noted above
- Click
Add Secret
Use Valet with a codespace
- Start the codespace
- Click the
Codewith button down arrow above repository on the repository's landing page. - Click the
Codespacestab - Click
Create codespaces on mainto create the codespace. If you are in another branch then themainbranch, the codespace will button will have the current branch specified. - Wait a couple minutes, then verify that the codespace starts up. Once it is fully booted up, the termininal should be present.
- Click the
- Verify Valet CLI is installed and working. More information on the GitHub Valet CLI extension
- Verify Valet CLI is installed and working
- Run
gh valet versionin the Visual Studio Code terminal and verify the output looks like the below image. Note the valet version will be different than below as the latest version gets pulled down.- If
gh valet versiondid not produce a similar image with a version please follow these instructions Troubleshoot GH Valet extension
- If
- Start using Valet by following along with the Labs for Azure DevOps
- Run GitLab setup script. This script will setup GitLab and ensure it is ready to use. In general, this script should be run first if you are starting a new codespace or restarting a existing one.
- In the codespace terminal run
source gitlab/bootstrap/setup.sh
- In the codespace terminal run
Labs for GitLab
Perform the following labs to test-drive Valet
- TBD
Troubleshoot GH Valet extension
TBD