diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9bdc2e9..7aca41f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,12 @@ { - "name": "Codespace to bootstrap valet in a Codespace", - //Use base codespace image then pull Valet on postCreateCommand, - "image": "mcr.microsoft.com/vscode/devcontainers/universal:linux", - "remoteUser": "codespace", + "name": "Codespace to bootstrap valet in a Codespace", + //Use base codespace image then pull Valet on postCreateCommand, + "image": "mcr.microsoft.com/vscode/devcontainers/universal:linux", + "remoteUser": "codespace", "overrideCommand": false, - "mounts": ["source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"], + "mounts": [ + "source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume" + ], "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", @@ -12,11 +14,10 @@ "--privileged", "--init" ], - // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-azuretools.vscode-docker", ], "onCreateCommand": 'echo "export GITHUB_ACCESS_TOKEN=$VALET_GHCR_PASSWORD" >> ~/.bashrc', - "postCreateCommand": "sudo bash .devcontainer/setupcodespace.sh ${VALET_GHCR_PASSWORD} ${AZURE_DEVOPS_PROJECT} ${AZURE_DEVOPS_ORGANIZATION} ${AZURE_DEVOPS_ACCESS_TOKEN} ${GITHUB_USER} ${JENKINS_USERNAME} ${JENKINS_PASSWORD}'https://github.com/' && gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' " -} + "postCreateCommand": "sudo bash .devcontainer/setupcodespace.sh ${VALET_GHCR_PASSWORD} ${AZURE_DEVOPS_PROJECT} ${AZURE_DEVOPS_ORGANIZATION} ${AZURE_DEVOPS_ACCESS_TOKEN} ${GITHUB_USER} 'https://github.com/' && gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' " +} \ No newline at end of file diff --git a/.devcontainer/setupcodespace.sh b/.devcontainer/setupcodespace.sh index 69ca866..c98469a 100644 --- a/.devcontainer/setupcodespace.sh +++ b/.devcontainer/setupcodespace.sh @@ -25,16 +25,4 @@ then echo "Error: Set envars not set, valid values not passed in. You will have to manually use the valet/.env.local folder" fi - -# if Jenkins codespace secrets are set, spin up Jenkins instance - -if [ -z "$7" -o -z "$8"] -then -else - echo "Jenkins secrets are set, starting Jenkins service" - ../jenkins/jenkins_setup/setupjenkins.sh $7 $8 -fi - - - echo "Finished setupcodespace.sh" diff --git a/.gitignore b/.gitignore index 45805d9..58996e1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,11 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +<<<<<<< HEAD .tmp +======= +>>>>>>> main # User-specific files *.rsuser *.suo diff --git a/readme.md b/readme.md index 690dc5c..cefd92e 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,16 @@ -# Welcome to Valet labs! +# Welcome to Valet labs + These Valet labs let you test-drive Valet by bootstrapping the environment of your choosing. To get started: + 1. Get access to Valet and create your own GitHub Repository. See [Prerequisites](#prerequisites) below. -2. Bootstrap your environment. The default page of the lab of your choosing will detail how to configure and run the action to bootstrap the environment. Currently these labs support [Azure DevOps](azure_devops). +2. Bootstrap your environment. The default page of the lab of your choosing will detail how to configure and run the action to bootstrap the environment. Currently these labs support [Azure DevOps](azure_devops) and [Jenkins](jenkins). 3. Run Valet via Codespaces. The codespace has docker running and will update to the latest Valet environment. 4. Proceed with running the labs! # Prerequisites + 1. Valet is currently private and customers must be onboarded prior to using it. Please reach out to [GitHub Sales](https://github.com/enterprise/contact) to inquire about being granted access. -2. Create your own GitHub Repository in your own GitHub Organization or under your user with Codespaces enabled using this Repository as a template. To do so: +2. Create your own GitHub Repository in your own GitHub Organization or under your user with Codespaces enabled using this Repository as a template. To do so: - Navigate to the top of this Repository click `Use this template` - Select the owner of the new Reposiotry. It could be your personal username or an Organization you belong to. - Name the Repository @@ -17,6 +20,6 @@ These Valet labs let you test-drive Valet by bootstrapping the environment of yo ![createtemplate](https://user-images.githubusercontent.com/26442605/174847176-0e515fd3-8107-43e0-af33-70b1ece36d3b.png) ## Environments to bootstrap + - [Azure DevOps](azure_devops) - [Jenkins](jenkins) -