From d3094b99dbb375e6e914b55c91ef5638dc54c65d Mon Sep 17 00:00:00 2001 From: Owen Barton Date: Tue, 29 Dec 2020 17:19:28 -0800 Subject: [PATCH] Removing old packer builds. --- .ci/build-packer-images.sh | 19 --- .ci/jenkins-agents.json | 196 ---------------------------- .ci/scripts/install-docker-tools.sh | 21 --- 3 files changed, 236 deletions(-) delete mode 100755 .ci/build-packer-images.sh delete mode 100644 .ci/jenkins-agents.json delete mode 100755 .ci/scripts/install-docker-tools.sh diff --git a/.ci/build-packer-images.sh b/.ci/build-packer-images.sh deleted file mode 100755 index 3284c2b..0000000 --- a/.ci/build-packer-images.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -export PROJECT=$(gcloud info --format='value(config.project)') -if [ -z "$PROJECT" ]; then - echo "Run 'gcloud config set project project-name' with a project that has been configured with Jenkins according to the instructions at https://cloud.google.com/solutions/using-jenkins-for-distributed-builds-on-compute-engine" - exit 1 -fi - -echo "This will build all Jenkins test agent GCE images and push them to your current gcloud project: '$PROJECT'." -read -n 1 -s -r -p "Press any key to continue" -echo - -packer version &> /dev/null -if [ $? -ne 0 ]; then - echo "Download and install Packer and retry: https://www.packer.io/intro/getting-started/install.html." - exit 1 -fi - -packer build jenkins-agents.json diff --git a/.ci/jenkins-agents.json b/.ci/jenkins-agents.json deleted file mode 100644 index 720c4b3..0000000 --- a/.ci/jenkins-agents.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "variables": { - "project_id": "{{env `PROJECT`}}" - }, - "builders": [ - { - "name": "ubuntu-1604", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "ubuntu-1604-lts", - "source_image_project_id": "ubuntu-os-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "ubuntu-1604-jenkins-agent-{{timestamp}}", - "image_description": "Ubuntu 16.04 LTS image with the built in Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "ubuntu" - }, - { - "name": "ubuntu-1804", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "ubuntu-1804-lts", - "source_image_project_id": "ubuntu-os-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "ubuntu-1804-jenkins-agent-{{timestamp}}", - "image_description": "Ubuntu 18.04 LTS image with the built in Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "ubuntu" - }, - { - "name": "ubuntu-1604-latest-docker", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "ubuntu-1604-lts", - "source_image_project_id": "ubuntu-os-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "ubuntu-1604-latest-docker-jenkins-agent-{{timestamp}}", - "image_description": "Ubuntu 16.04 LTS image with upgraded docker.com edge Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "ubuntu" - }, - { - "name": "ubuntu-1804-latest-docker", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "ubuntu-1804-lts", - "source_image_project_id": "ubuntu-os-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "ubuntu-1804-latest-docker-jenkins-agent-{{timestamp}}", - "image_description": "Ubuntu 18.04 LTS image with upgraded docker.com edge Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "ubuntu" - }, - { - "name": "centos-7", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "centos-7", - "source_image_project_id": "centos-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "centos-7-jenkins-agent-{{timestamp}}", - "image_description": "CentOS 7 with the built in Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "packer" - }, - { - "name": "centos-7-latest-docker", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "centos-7", - "source_image_project_id": "centos-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "centos-7-latest-docker-jenkins-agent-{{timestamp}}", - "image_description": "CentOS 7 with upgraded docker.com edge Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "packer" - }, - { - "name": "rhel-7", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "rhel-7", - "source_image_project_id": "rhel-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "rhel-7-jenkins-agent-{{timestamp}}", - "image_description": "RHEL 7 with the built in Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "packer" - }, - { - "name": "rhel-7-latest-docker", - "type": "googlecompute", - "project_id": "{{user `project_id`}}", - "source_image_family": "rhel-7", - "source_image_project_id": "rhel-cloud", - "zone": "us-central1-a", - "disk_size": "10", - "image_name": "rhel-7-latest-docker-jenkins-agent-{{timestamp}}", - "image_description": "RHEL 7 with upgraded docker.com edge Docker and all stable Docker Compose", - "image_family": "jenkins-agent", - "ssh_username": "packer" - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "until stat /var/lib/cloud/instance/boot-finished 2>/dev/null; do echo waiting ...; sleep 1; done", - "sudo rm -rf /var/lib/apt/lists/*", - "sudo apt-get update", - "sudo apt-get install -y default-jre docker.io zsh mksh", - "sudo adduser --disabled-password --gecos '' jenkins", - "sudo usermod -aG docker jenkins" - ], - "only": [ - "ubuntu-1604", - "ubuntu-1804" - ] - }, - { - "type": "shell", - "inline": [ - "until stat /var/lib/cloud/instance/boot-finished 2>/dev/null; do echo waiting ...; sleep 1; done", - "sudo rm -rf /var/lib/apt/lists/*", - "sudo apt-get update", - "sudo apt-get install -y default-jre zsh mksh", - "curl -fsSL https://get.docker.com -o get-docker.sh", - "sudo sh get-docker.sh", - "sudo adduser --disabled-password --gecos '' jenkins", - "sudo usermod -aG docker jenkins" - ], - "only": [ - "ubuntu-1604-latest-docker", - "ubuntu-1804-latest-docker" - ] - }, - { - "type": "shell", - "inline": [ - "sudo yum -y update", - "sudo yum -y install git docker java-1.8.0-openjdk zsh mksh", - "sudo systemctl enable docker.service", - "sudo groupadd docker", - "sudo adduser jenkins", - "sudo usermod -aG docker jenkins" - ], - "only": [ - "centos-7", - "rhel-7" - ] - }, - { - "type": "shell", - "inline": [ - "sudo yum -y update", - "sudo yum -y install git java-1.8.0-openjdk zsh mksh", - "curl -fsSL https://get.docker.com -o get-docker.sh", - "sudo sh get-docker.sh", - "sudo systemctl enable docker.service", - "sudo adduser jenkins", - "sudo usermod -aG docker jenkins" - ], - "only": [ - "centos-7-latest-docker" - ] - }, - { - "type": "shell", - "inline": [ - "sudo curl -fsSL https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo", - "sudo yum -y update", - "sudo yum -y install git java-1.8.0-openjdk zsh mksh docker-ce", - "sudo systemctl enable docker.service", - "echo net.ipv4.ip_forward=1 | sudo tee -a /etc/sysctl.d/enable-ip-forward.conf", - "sudo adduser jenkins", - "sudo usermod -aG docker jenkins" - ], - "only": [ - "rhel-7-latest-docker" - ] - }, - { - "type": "shell", - "scripts": [ - "./scripts/install-docker-tools.sh" - ] - } - ] -} diff --git a/.ci/scripts/install-docker-tools.sh b/.ci/scripts/install-docker-tools.sh deleted file mode 100755 index 971ec9f..0000000 --- a/.ci/scripts/install-docker-tools.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -echo "Installing all stable releases of Docker Compose" -TAGS=$(git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP '[0-9]+\.[0-9][0-9]+\.[0-9]+$' | sort -n) -for COMPOSE_VERSION in $TAGS; do - echo "Fetching Docker Compose version ${COMPOSE_VERSION}" - sudo curl -LsS -C - https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose-${COMPOSE_VERSION} -done -sudo chmod a+x /usr/local/bin/docker-compose-* -echo "Symlinking most recent stable version" -sudo ln -s /usr/local/bin/docker-compose-${COMPOSE_VERSION} /usr/local/bin/docker-compose - -echo "Installing all stable releases of Habitus" -TAGS=$(git ls-remote https://github.com/cloud66-oss/habitus | grep refs/tags | grep -oP '[0-9]+\.[0-9]+\.[0-9]+$' | sort -n) -for HABITUS_VERSION in $TAGS; do - echo "Fetching Habitus version ${HABITUS_VERSION}" - sudo curl -LsS -C - https://github.com/cloud66-oss/habitus/releases/download/${HABITUS_VERSION}/habitus_linux_amd64 -o /usr/local/bin/habitus-${HABITUS_VERSION} -done -sudo chmod a+x /usr/local/bin/habitus-* -echo "Symlinking most recent stable version" -sudo ln -s /usr/local/bin/habitus-${HABITUS_VERSION} /usr/local/bin/habitus