From 9e521c41ca22449bdd4a53c2422d01293f2807f3 Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Mon, 6 May 2024 17:15:16 +0530 Subject: [PATCH] chore: add aws cli Add aws cli to the runner image. Signed-off-by: Noel Georgi --- .drone.yml | 54 ++++++++++++++++++++++---- Dockerfile.actions-runner-ubuntu-22.04 | 3 ++ 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index a9c51ea..5d0a788 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,20 +12,28 @@ steps: commands: - git fetch --tags - install-ci-key - - setup-buildx-amd64-arm64 + - setup-ci volumes: + - name: outer-docker-socket + path: /var/outer-run - name: docker-socket path: /var/run - - name: docker + - name: ssh + path: /root/.ssh + - name: buildx path: /root/.docker/buildx - name: build-dry-run image: autonomy/build-container:latest pull: always volumes: + - name: outer-docker-socket + path: /var/outer-run - name: docker-socket path: /var/run - - name: docker + - name: ssh + path: /root/.ssh + - name: buildx path: /root/.docker/buildx commands: - docker buildx build -f Dockerfile -t autonomy/build-container . @@ -38,9 +46,13 @@ steps: image: autonomy/build-container:latest pull: always volumes: + - name: outer-docker-socket + path: /var/outer-run - name: docker-socket path: /var/run - - name: docker + - name: ssh + path: /root/.ssh + - name: buildx path: /root/.docker/buildx environment: DOCKER_USERNAME: @@ -62,12 +74,40 @@ trigger: - renovate/* - dependabot/* -volumes: +services: +- name: docker + image: docker:20.10-dind + entrypoint: + - dockerd + commands: + - --dns=8.8.8.8 + - --dns=8.8.4.4 + - --mtu=1500 + - --log-level=error + privileged: true + volumes: - name: docker-socket + path: /var/run + - name: outer-docker-socket + path: /var/outer-run + - name: buildx + path: /root/.docker/buildx + - name: ssh + path: /root/.ssh + +volumes: + - name: outer-docker-socket host: path: /var/ci-docker - - name: docker - temp: {} + - name: docker-socket + temp: + medium: memory + - name: buildx + temp: + medium: memory + - name: ssh + temp: + medium: memory --- kind: pipeline diff --git a/Dockerfile.actions-runner-ubuntu-22.04 b/Dockerfile.actions-runner-ubuntu-22.04 index 417aa98..6a1766c 100644 --- a/Dockerfile.actions-runner-ubuntu-22.04 +++ b/Dockerfile.actions-runner-ubuntu-22.04 @@ -5,6 +5,8 @@ ARG CRANE_VERSION=v0.19.1 ARG YQ_VERSION=v4.43.1 # renovate: datasource=github-releases depName=getsops/sops ARG SOPS_VERSION=v3.8.1 +# renovate: datasource=github-tags depName=aws/aws-cli +ARG AWSCLI_VERSION=2.15.44 USER root RUN apt update && \ apt upgrade -y && \ @@ -28,4 +30,5 @@ RUN apt update && \ RUN curl -fSL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq RUN curl -fSL https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz | tar xzf - -C /usr/local/bin/ crane RUN curl -fSL https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux.amd64 -o /usr/bin/sops && chmod +x /usr/bin/sops +RUN curl -fSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWSCLI_VERSION}.zip -o awscliv2.zip && unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip aws USER runner