Delete unused CI scripts

This commit is contained in:
Radon Rosborough 2022-01-30 16:15:07 -08:00
parent 71dcd62af4
commit 02e52f1c88
2 changed files with 0 additions and 83 deletions

View File

@ -1,48 +0,0 @@
data "amazon-ami" "ubuntu" {
filters = {
name = "ubuntu/images/hvm-ssd/ubuntu-*-21.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
}
locals {
timestamp = regex_replace(timestamp(), "[- TZ:]", "")
}
source "amazon-ebs" "ubuntu" {
ami_name = "riju-ci-${local.timestamp}"
instance_type = "t3.micro"
source_ami = "${data.amazon-ami.ubuntu.id}"
ssh_username = "ubuntu"
tag {
key = "BillingCategory"
value = "Riju"
}
tag {
key = "BillingSubcategory"
value = "Riju:AMI"
}
tag {
key = "Name"
value = "riju-ci-${local.timestamp}"
}
}
build {
sources = ["source.amazon-ebs.ubuntu"]
provisioner "file" {
destination = "/tmp/riju-init-volume"
source = "riju-init-volume"
}
provisioner "shell" {
script = "provision-ci.bash"
}
}

View File

@ -1,35 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# I think there is a race condition related to Ubuntu wanting to do an
# automated system upgrade at boot, which causes 'apt-get update' to
# sometimes fail with an obscure error message.
sleep 5
mkdir /tmp/riju-work
pushd /tmp/riju-work
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get dist-upgrade -y
sudo -E apt-get install -y curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -E apt-key add -
ubuntu_name="$(lsb_release -cs)"
sudo tee -a /etc/apt/sources.list.d/custom.list >/dev/null <<EOF
deb [arch=amd64] https://download.docker.com/linux/ubuntu ${ubuntu_name} stable
EOF
sudo -E apt-get update
sudo -E apt-get install -y docker-ce docker-ce-cli containerd.io make
sudo chown root:root /tmp/riju-init-volume
sudo mv /tmp/riju-init-volume /usr/local/bin/
popd
rm -rf /tmp/riju-work