mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-27 08:19:27 -05:00
06f344ebb4
Copied CICD scripts into the repository so that the community can make contributions to the build system. Wrote a brief description of the build and distribute process. Modified the CICD config to use the repo hosted scripts. [ci skip]
68 lines
2.5 KiB
Bash
68 lines
2.5 KiB
Bash
#!/bin/bash
|
|
|
|
if [ "$1" = "create" ] && [ "$2" = "amd64-deb" ]
|
|
then
|
|
## Create amd64-deb build machine
|
|
echo "Creating amd64-deb build machine"
|
|
doctl compute droplet create build-server-amd64-deb-tmp --image 154584863 \
|
|
--size c2-8vcpu-16gb-intel --region nyc1 --enable-private-networking \
|
|
--ssh-keys 38852180,38632397,41187560 --tag-names build-machines,build-orchestration --wait
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "create" ] && [ "$2" = "arm64-deb" ]
|
|
then
|
|
## Create arm64-deb build machine
|
|
echo "Creating arm64-deb build machine"
|
|
doctl compute droplet create build-server-arm64-deb-tmp --image 154584861 \
|
|
--size c2-8vcpu-16gb-intel --region nyc1 --enable-private-networking \
|
|
--ssh-keys 38852180,38632397,41187560 --tag-names build-machines,build-orchestration --wait
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "create" ] && [ "$2" = "amd64-rpm" ]
|
|
then
|
|
## Create amd64-rpm build machine
|
|
echo "Creating amd64-rpm build machine"
|
|
doctl compute droplet create build-server-amd64-rpm-tmp --image 154584864 \
|
|
--size c2-8vcpu-16gb-intel --region nyc1 --enable-private-networking \
|
|
--ssh-keys 38852180,38632397,41187560 --tag-names build-machines,build-orchestration --wait
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "create" ] && [ "$2" = "arm64-rpm" ] ## This snapshot does not yet exist
|
|
then
|
|
## Create arm64-rpm build machine
|
|
echo "Creating arm64-rpm build machine"
|
|
doctl compute droplet create build-server-arm64-rpm-tmp --image 154584864 \
|
|
--size c2-8vcpu-16gb-intel --region nyc1 --enable-private-networking \
|
|
--ssh-keys 38852180,38632397,41187560 --tag-names build-machines,build-orchestration --wait
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "delete" ] && [ "$2" = "amd64-deb" ]
|
|
then
|
|
## Delete amd64-deb build machine
|
|
echo "Deleting amd64-deb build machine"
|
|
doctl compute droplet delete build-server-amd64-deb-tmp --force
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "delete" ] && [ "$2" = "arm64-deb" ]
|
|
then
|
|
## Delete arm64-deb build machine
|
|
echo "Deleting arm64-deb build machine"
|
|
doctl compute droplet delete build-server-arm64-deb-tmp --force
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "delete" ] && [ "$2" = "amd64-rpm" ]
|
|
then
|
|
## Delete amd64-rpm build machine
|
|
echo "Deleting amd64-rpm build machine"
|
|
doctl compute droplet delete build-server-amd64-rpm-tmp --force
|
|
echo "Done"
|
|
|
|
elif [ "$1" = "delete" ] && [ "$2" = "arm64-rpm" ] ## This snapshot does not exist yet
|
|
then
|
|
## Delete arm64-rpm build machine
|
|
echo "Deleting arm64-rpm build machine"
|
|
doctl compute droplet delete build-server-arm64-rpm-tmp --force
|
|
echo "Done"
|
|
else
|
|
echo $1 "is not a valid command to execute for "$2
|
|
fi |