Skip to content

Commit

Permalink
Merge tag 'v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kaz committed Dec 13, 2024
2 parents 7251a11 + 1fe3111 commit f7233d0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github_/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
with:
context: ./bench
push: true
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
tags: |
${{ vars.AWS_ECR_REPOSITORY }}:latest
${{ vars.AWS_ECR_REPOSITORY }}:${{ github.sha }}
12 changes: 0 additions & 12 deletions bench/.ko.yaml

This file was deleted.

25 changes: 14 additions & 11 deletions bench/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
ARG SV_IMAGE="692859926955.dkr.ecr.ap-northeast-1.amazonaws.com/stg/benchmarker:supervisor"
ARG SV_IMAGE="703671906592.dkr.ecr.ap-northeast-1.amazonaws.com/prod/benchmarker:supervisor"
FROM ${SV_IMAGE} AS supervisor

FROM public.ecr.aws/docker/library/golang:bookworm AS builder

FROM public.ecr.aws/docker/library/golang:1.23 AS builder
WORKDIR /app
COPY . .
RUN go build -o /app/bench -ldflags "-s -w" .

FROM ${SV_IMAGE} AS supervisor
RUN go build -o /app/bench -ldflags "-s -w" -trimpath .

FROM public.ecr.aws/docker/library/debian:bookworm-slim
RUN apt-get update && apt install -y ca-certificates openssl curl unzip jq
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip ./aws/
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

RUN apt-get update
RUN apt install -y ca-certificates openssl curl
RUN bash -c "curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.1.0/aqua-installer | bash"
ENV PATH=/root/.local/share/aquaproj-aqua/bin:$PATH
ENV AQUA_GLOBAL_CONFIG=/etc/aqua/aqua.yaml
COPY aqua.yaml /etc/aqua/
RUN aqua i -a
WORKDIR /app
COPY --from=builder /app/bench /app/bench
COPY --from=supervisor /usr/local/bin/isuxportal-supervisor /app/supervisor
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/app/supervisor", "/app/bench", "run"]
6 changes: 3 additions & 3 deletions bench/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ tasks:
build-linux-amd64:
cmds:
- GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o ./bin/bench_linux_amd64
build-image:
cmds:
- docker build -t isucon14-benchmarker .
test:
cmds:
- go test ./...
image-build:
cmds:
- ko build -L .
gen:
cmds:
- go generate ./...
Expand Down
7 changes: 7 additions & 0 deletions bench/aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
registries:
- type: standard
ref: v4.275.0
packages:
- name: aws/[email protected]
- name: jqlang/[email protected]

0 comments on commit f7233d0

Please sign in to comment.