Update azure devops setup instructions
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"name": "Codespace to bootstrap valet in a Codespace",
|
||||
//Use base codespace image then pull Valet on postCreateCommand,
|
||||
"name": "Codespace to perform Valet Labs",
|
||||
"image": "mcr.microsoft.com/vscode/devcontainers/universal:linux",
|
||||
"remoteUser": "codespace",
|
||||
"overrideCommand": false,
|
||||
@@ -15,8 +14,7 @@
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"ms-azuretools.vscode-docker",
|
||||
"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} 'https://github.com/' && gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' "
|
||||
"postCreateCommand": "gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' "
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "Starting setupcodespace.sh"
|
||||
|
||||
azdoProject="AZURE_DEVOPS_PROJECT="
|
||||
azdoOrg="AZURE_DEVOPS_ORGANIZATION="
|
||||
azdoInstance="AZURE_DEVOPS_INSTANCE_URL="
|
||||
ghAccess="GITHUB_ACCESS_TOKEN="
|
||||
azdoAccess="AZURE_DEVOPS_ACCESS_TOKEN="
|
||||
ghInstanceUrl="GITHUB_INSTANCE_URL="
|
||||
|
||||
if [ -z "$1" -o -z "$5" ]
|
||||
then
|
||||
echo "Error: Docker Pull Valet not executing because GITHUB_USER and/or VALET_PASSWORD not set"
|
||||
else
|
||||
docker login ghcr.io/valet-customers --username $5 --password $1
|
||||
docker pull ghcr.io/valet-customers/valet-cli:latest
|
||||
echo "Success: Docker Pull Valet completed"
|
||||
fi
|
||||
|
||||
value=`cat valet/.env.local.template`
|
||||
echo "$value" > valet/.env.local
|
||||
|
||||
if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$6" ]
|
||||
then
|
||||
echo "Error: Set envars not set, valid values not passed in. You will have to manually use the valet/.env.local folder"
|
||||
fi
|
||||
|
||||
echo "Finished setupcodespace.sh"
|
||||
Reference in New Issue
Block a user