Skip to content

Commit

Permalink
chore: add aws cli
Browse files Browse the repository at this point in the history
Add aws cli to the runner image.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed May 6, 2024
1 parent f60c695 commit 9e521c4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
54 changes: 47 additions & 7 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -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:
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.actions-runner-ubuntu-22.04
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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

0 comments on commit 9e521c4

Please sign in to comment.