Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed Sep 18, 2024
1 parent 7daedbc commit 60d17e9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.21

ARG version
ARG fork
ENV version=${version}
ENV fork=${fork:-scylladb/scylla-bench}

RUN apt-get update && apt-get -y install --no-install-recommends unzip curl && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN curl -Lo sb.zip https://github.com/${fork}/archive/refs/${version}.zip && \
unzip sb.zip && \
cd ./scylla-bench-* && \
GO111MODULE=on go install . && \
cd .. && \
rm -f sb.zip
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,27 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
path: gocql

- name: Build and push Scylla-bench Docker Image with gocql from PR
- name: Replace gocql with the PR version
run: |
cd scylla-bench
GOCQL_REPO="github.com/${{ github.event.pull_request.head.repo.full_name }}" GOCQL_VERSION="${{ github.event.pull_request.head.ref }}" make build-with-custom-gocql-version
DOCKER_IMAGE_TAG="scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.sha }}" DOCKER_IMAGE_LABELS="com.scylladb.gocql-version=${{ github.event.pull_request.head.sha }}" make build-sct-docker-image
docker push "scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.sha }}"
go mod edit -replace github.com/gocql/gocql=../gocql
go mod tidy
- name: Build and push Scylla-bench Docker Image
run: |
cd scylla-bench
export SCYLLA_BENCH_VERSION=tags/v0.1.22
export NAME="${{ github.event.pull_request.head.sha }}"
export SCYLLA_BENCH_DOCKER_IMAGE=scylladb/gocql-extended-ci:scylla-bench-${NAME}
docker build -f ../gocql/.github/workflows/Dockerfile . -t ${SCYLLA_BENCH_DOCKER_IMAGE} --build-arg version=$SCYLLA_BENCH_VERSION
docker push ${SCYLLA_BENCH_DOCKER_IMAGE}
# - name: Build and push Scylla-bench Docker Image with gocql from PR
# run: |
# cd scylla-bench
# GOCQL_REPO="github.com/${{ github.event.pull_request.head.repo.full_name }}" GOCQL_VERSION="${{ github.event.pull_request.head.ref }}" make build-with-custom-gocql-version
# DOCKER_IMAGE_TAG="scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.sha }}" DOCKER_IMAGE_LABELS="com.scylladb.gocql-version=${{ github.event.pull_request.head.sha }}" make build-sct-docker-image
# docker push "scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.sha }}"

- name: Start Jenkins job
uses: sylwiaszunejko/jenkins_client@main
Expand Down

0 comments on commit 60d17e9

Please sign in to comment.