From 15c3dc7ad6e0c24087626c1cf2fdef1bf68fb1be Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 24 May 2024 13:18:29 +0100 Subject: [PATCH] Revert "feat: build pizzas on alpine" (#3194) --- .github/workflows/pizza-teardown.yml | 2 +- .github/workflows/pull-request.yml | 24 ++++++------------------ scripts/pullrequest/create.sh | 9 +++++++++ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pizza-teardown.yml b/.github/workflows/pizza-teardown.yml index 5eec564860..24e3de0de2 100644 --- a/.github/workflows/pizza-teardown.yml +++ b/.github/workflows/pizza-teardown.yml @@ -17,7 +17,7 @@ jobs: action: destroy api_key: ${{ secrets.VULTR_API_KEY }} domain: ${{ env.DOMAIN }} - os_type: alpine + os_type: ubuntu plan: vc2-1c-1gb pull_request_id: ${{ env.PULLREQUEST_ID }} region: lhr diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f61e29c664..30a46e86a2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -307,7 +307,7 @@ jobs: action: create api_key: ${{ secrets.VULTR_API_KEY }} domain: ${{ env.DOMAIN }} - os_type: alpine + os_type: ubuntu plan: vc2-1c-1gb pull_request_id: ${{ env.PULLREQUEST_ID }} region: lhr @@ -324,19 +324,13 @@ jobs: password: ${{ steps.create.outputs.default_password }} command_timeout: 20m script: | - apk update - apk add docker - addgroup root docker - rc-update add docker default - service docker start - apk add docker-cli-compose - - apk add git + apt-get update -y + git clone "${{ secrets.AUTHENTICATED_REPO_URL }}" cd planx-new git fetch origin "pull/${{ env.PULLREQUEST_ID }}/head" && git checkout FETCH_HEAD - apk add aws-cli + apt-get install awscli -y export AWS_ACCESS_KEY_ID=${{ secrets.PIZZA_AWS_ACCESS_KEY_ID }} export AWS_SECRET_ACCESS_KEY=${{ secrets.PIZZA_AWS_SECRET_ACCESS_KEY }} export AWS_REGION=eu-west-2 @@ -358,21 +352,15 @@ jobs: username: root password: ${{ secrets.SSH_PASSWORD }} command_timeout: 10m - # TODO: some of below script might be superfluous for server update (rather than create) script: | - apk update - apk add docker - addgroup root docker - rc-update add docker default - service docker start - apk add docker-cli-compose + apt-get update -y git clone "${{ secrets.AUTHENTICATED_REPO_URL }}" cd planx-new git add . && git stash git fetch origin "pull/${{ env.PULLREQUEST_ID }}/head" && git checkout FETCH_HEAD - apk add aws-cli + apt-get install awscli -y export AWS_ACCESS_KEY_ID=${{ secrets.PIZZA_AWS_ACCESS_KEY_ID }} export AWS_SECRET_ACCESS_KEY=${{ secrets.PIZZA_AWS_SECRET_ACCESS_KEY }} export AWS_REGION=eu-west-2 diff --git a/scripts/pullrequest/create.sh b/scripts/pullrequest/create.sh index 6f0f9394f5..c8fc91cadf 100755 --- a/scripts/pullrequest/create.sh +++ b/scripts/pullrequest/create.sh @@ -10,6 +10,15 @@ echo "root:$SSH_PASSWORD" | chpasswd # https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04 swapon --show +# install docker +apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --batch --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +echo \ + "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null +apt-get update -y +apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y + # set env for this shell set -o allexport source .env.pizza