forked from apache/cassandra-gocql-driver
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github workflow running jenkins job #260
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Trigger jenkins job with custom scylla-bench image | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened, labeled] | ||
|
||
jobs: | ||
authorize: | ||
environment: | ||
${{ github.event_name == 'pull_request_target' && | ||
github.event.pull_request.head.repo.full_name != github.repository && | ||
'default' || 'internal' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true | ||
|
||
build-scylla-bench: | ||
if: contains(github.event.pull_request.labels.*.name, 'extended-ci') | ||
needs: authorize | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Check out the scylla-bench repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: scylladb/scylla-bench | ||
path: scylla-bench | ||
|
||
- name: Checkout GoCQL PR Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
path: gocql | ||
|
||
- name: Replace gocql with the PR version | ||
run: | | ||
cd scylla-bench | ||
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.ref }}" | ||
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 | ||
Comment on lines
+41
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's move this logic to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
docker push ${SCYLLA_BENCH_DOCKER_IMAGE} | ||
|
||
- name: Start Jenkins job | ||
uses: sylwiaszunejko/jenkins_client@main | ||
with: | ||
jenkins_job_name: 'scylla-staging/sylwia.szunejko/longevity-large-partition-asymmetric-cluster-3h-test' | ||
jenkins_job_parameters: '{"email_recipients": "[email protected]", "scylla_version": "master:latest", "extra_environment_variables": "SCT_STRESS_IMAGE.scylla-bench=scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.ref }}"}' | ||
jenkins_base_url: 'https://jenkins.scylladb.com/' | ||
jenkins_user: sylwiaszunejko | ||
jenkins_password: ${{ secrets.JENKINS_TOKEN }} | ||
wait_for_result: 'True' | ||
polling_interval: '120' | ||
polling_timeout: '12600' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build scylla-bench docker image with gocql PR | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened, labeled] | ||
|
||
jobs: | ||
authorize: | ||
environment: | ||
${{ github.event_name == 'pull_request_target' && | ||
github.event.pull_request.head.repo.full_name != github.repository && | ||
'default' || 'internal' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true | ||
|
||
build-scylla-bench: | ||
if: contains(github.event.pull_request.labels.*.name, 'extended-ci') | ||
needs: authorize | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Check out the scylla-bench repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: scylladb/scylla-bench | ||
path: scylla-bench | ||
|
||
- name: Checkout GoCQL PR Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
path: gocql | ||
|
||
- name: Build and push Scylla-bench Docker Image with gocql from PR | ||
run: | | ||
cd scylla-bench | ||
GOCQL_REPO="${{ github.event.pull_request.head.repo.full_name }} GOCQL_COMMIT_ID="${{ github.event.pull_request.head.ref }}" IMAGE_TAG="scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.ref }}" make build-image-with-custom-gocql-commit | ||
docker push "scylladb/gocql-extended-ci:scylla-bench-${NAME}" | ||
|
||
- name: Start Jenkins job | ||
uses: sylwiaszunejko/jenkins_client@main | ||
with: | ||
jenkins_job_name: 'scylla-staging/sylwia.szunejko/longevity-large-partition-asymmetric-cluster-3h-test' | ||
jenkins_job_parameters: '{"email_recipients": "[email protected]", "scylla_version": "master:latest", "extra_environment_variables": "SCT_STRESS_IMAGE.scylla-bench=scylladb/gocql-extended-ci:scylla-bench-${{ github.event.pull_request.head.ref }}"}' | ||
jenkins_base_url: 'https://jenkins.scylladb.com/' | ||
jenkins_user: sylwiaszunejko | ||
jenkins_password: ${{ secrets.JENKINS_TOKEN }} | ||
wait_for_result: 'True' | ||
polling_interval: '120' | ||
polling_timeout: '12600' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it default ? can't you just use
path: gocql
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to be not, look: https://github.com/scylladb/gocql/pull/255/checks
Or do you mean I should add
path: gocql
in some other place?