Updated start up script
This commit is contained in:
@@ -18,5 +18,5 @@
|
||||
"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": "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.' "
|
||||
}
|
||||
|
||||
@@ -25,4 +25,16 @@ 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"
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
container_name="jenkins"
|
||||
username="admin"
|
||||
password="password"
|
||||
|
||||
echo "Building Jenkins instance!"
|
||||
|
||||
# Build jenkins image from docker compose file
|
||||
docker build -t jenkins:$container_name $(pwd)/jenkins/jenkins_setup
|
||||
|
||||
# wait until docker image is ready
|
||||
sleep 2
|
||||
|
||||
# Build container
|
||||
docker run --name jenkins --rm -p 8080:8080 --env JENKINS_ADMIN_ID=$username --env JENKINS_ADMIN_PASSWORD=$password jenkins:$container_name
|
||||
|
||||
Reference in New Issue
Block a user